An elegant way to define a sequenceAn elegant non-technical account on the work of Joseph Fourier. Numbers Made From Concatenating Prime FactorizationsNaive categorical question about prime numbers, primes, and irreduciblesTips for Prime Factorization of a Given Large IntergerAbout a Sequence of Prime Numbers inspired by the Green Tao TheoremAbout a sequence on Prime numbers.Longest sequence of primes where each term is obtained by appending a new digit to the previous termProof of existence of infinitely many primes that divide the sequence $S(k)=sum_i=1^n a_i^k$ where $a_i_i=1^n$ forms an APLongest sequence of consecutive integers which are not coprime with $n!$Some primes with a “special” property
A category-like structure without composition?
Why was the shrinking from 8″ made only to 5.25″ and not smaller (4″ or less)?
Can we compute the area of a quadrilateral with one right angle when we only know the lengths of any three sides?
One verb to replace 'be a member of' a club
Cursor Replacement for Newbies
Is it inappropriate for a student to attend their mentor's dissertation defense?
How do I gain back my faith in my PhD degree?
How can I determine if the org that I'm currently connected to is a scratch org?
Is it possible to create a QR code using text?
What mechanic is there to disable a threat instead of killing it?
Why no variance term in Bayesian logistic regression?
Is it acceptable for a professor to tell male students to not think that they are smarter than female students?
Do scales need to be in alphabetical order?
Personal Teleportation: From Rags to Riches
Would Slavery Reparations be considered Bills of Attainder and hence Illegal?
What's the in-universe reasoning behind sorcerers needing material components?
Why can't we play rap on piano?
What exploit Are these user agents trying to use?
Reverse dictionary where values are lists
Bullying boss launched a smear campaign and made me unemployable
Ambiguity in the definition of entropy
Venezuelan girlfriend wants to travel the USA to be with me. What is the process?
GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?
How to tell a function to use the default argument values?
An elegant way to define a sequence
An elegant non-technical account on the work of Joseph Fourier. Numbers Made From Concatenating Prime FactorizationsNaive categorical question about prime numbers, primes, and irreduciblesTips for Prime Factorization of a Given Large IntergerAbout a Sequence of Prime Numbers inspired by the Green Tao TheoremAbout a sequence on Prime numbers.Longest sequence of primes where each term is obtained by appending a new digit to the previous termProof of existence of infinitely many primes that divide the sequence $S(k)=sum_i=1^n a_i^k$ where $a_i_i=1^n$ forms an APLongest sequence of consecutive integers which are not coprime with $n!$Some primes with a “special” property
$begingroup$
I am trying to define a sequence.
The first few terms of the sequence are:
$2,5,13,43,61$
Not yet found other terms because I am working with paper and pen, no software.
Why the first term is $5$?
Let be $pi(x)$ the celebrated prime counting function.
Well 5-$pi(5)$=$5-3$=2 which is a prime.
If we repeat the same thing with the new prime $2$, we have 2-$pi(2)=1$, which is not a prime. So starting the sequence from prime $5$, we have the cycle $5rightarrow 2rightarrow 1$. The arrows stop when a not prime is reached. No prime below $5$ has a longer cycle. Infact starting for example from $3$ you get $3-pi(3)=1$, which is not prime so the cycle is simply $3rightarrow 1$.
The second term of the sequence is $13$ because below $13$ no other prime has a larger cycle. Infact $13-pi(13)=7$, which is prime. Then $7-pi(7)=3$, which is prime and eventually $3-pi(3)=1$, which is not prime. So the cycle is $13rightarrow 7rightarrow 3rightarrow 1$
The cycle for 43 is longer so it is the third term of the above sequence.
Could you suggest to me a nice and elegant definition for this sequence: $5,13,43,61...$ (I don't know if it is infinite)
Could you find other terms with Pari if you want?
number-theory
$endgroup$
|
show 8 more comments
$begingroup$
I am trying to define a sequence.
The first few terms of the sequence are:
$2,5,13,43,61$
Not yet found other terms because I am working with paper and pen, no software.
Why the first term is $5$?
Let be $pi(x)$ the celebrated prime counting function.
Well 5-$pi(5)$=$5-3$=2 which is a prime.
If we repeat the same thing with the new prime $2$, we have 2-$pi(2)=1$, which is not a prime. So starting the sequence from prime $5$, we have the cycle $5rightarrow 2rightarrow 1$. The arrows stop when a not prime is reached. No prime below $5$ has a longer cycle. Infact starting for example from $3$ you get $3-pi(3)=1$, which is not prime so the cycle is simply $3rightarrow 1$.
The second term of the sequence is $13$ because below $13$ no other prime has a larger cycle. Infact $13-pi(13)=7$, which is prime. Then $7-pi(7)=3$, which is prime and eventually $3-pi(3)=1$, which is not prime. So the cycle is $13rightarrow 7rightarrow 3rightarrow 1$
The cycle for 43 is longer so it is the third term of the above sequence.
Could you suggest to me a nice and elegant definition for this sequence: $5,13,43,61...$ (I don't know if it is infinite)
Could you find other terms with Pari if you want?
number-theory
$endgroup$
$begingroup$
@Barry Cipra any idea?
$endgroup$
– homunculus
2 days ago
$begingroup$
oeis.org/A147259
$endgroup$
– Don Thousand
2 days ago
$begingroup$
@Don Thousand are you sure is that?
$endgroup$
– homunculus
2 days ago
1
$begingroup$
The next terms in the sequence are $14897$ and $377942237 $.
$endgroup$
– Chip Hurst
2 days ago
2
$begingroup$
Chip Hurst record goes like this: $$377942237 mapsto 357721207 mapsto 338525531 mapsto 320305991 mapsto 303015169 mapsto 286608383 mapsto 271043027 mapsto 256278002$$
$endgroup$
– Jeppe Stig Nielsen
2 days ago
|
show 8 more comments
$begingroup$
I am trying to define a sequence.
The first few terms of the sequence are:
$2,5,13,43,61$
Not yet found other terms because I am working with paper and pen, no software.
Why the first term is $5$?
Let be $pi(x)$ the celebrated prime counting function.
Well 5-$pi(5)$=$5-3$=2 which is a prime.
If we repeat the same thing with the new prime $2$, we have 2-$pi(2)=1$, which is not a prime. So starting the sequence from prime $5$, we have the cycle $5rightarrow 2rightarrow 1$. The arrows stop when a not prime is reached. No prime below $5$ has a longer cycle. Infact starting for example from $3$ you get $3-pi(3)=1$, which is not prime so the cycle is simply $3rightarrow 1$.
The second term of the sequence is $13$ because below $13$ no other prime has a larger cycle. Infact $13-pi(13)=7$, which is prime. Then $7-pi(7)=3$, which is prime and eventually $3-pi(3)=1$, which is not prime. So the cycle is $13rightarrow 7rightarrow 3rightarrow 1$
The cycle for 43 is longer so it is the third term of the above sequence.
Could you suggest to me a nice and elegant definition for this sequence: $5,13,43,61...$ (I don't know if it is infinite)
Could you find other terms with Pari if you want?
number-theory
$endgroup$
I am trying to define a sequence.
The first few terms of the sequence are:
$2,5,13,43,61$
Not yet found other terms because I am working with paper and pen, no software.
Why the first term is $5$?
Let be $pi(x)$ the celebrated prime counting function.
Well 5-$pi(5)$=$5-3$=2 which is a prime.
If we repeat the same thing with the new prime $2$, we have 2-$pi(2)=1$, which is not a prime. So starting the sequence from prime $5$, we have the cycle $5rightarrow 2rightarrow 1$. The arrows stop when a not prime is reached. No prime below $5$ has a longer cycle. Infact starting for example from $3$ you get $3-pi(3)=1$, which is not prime so the cycle is simply $3rightarrow 1$.
The second term of the sequence is $13$ because below $13$ no other prime has a larger cycle. Infact $13-pi(13)=7$, which is prime. Then $7-pi(7)=3$, which is prime and eventually $3-pi(3)=1$, which is not prime. So the cycle is $13rightarrow 7rightarrow 3rightarrow 1$
The cycle for 43 is longer so it is the third term of the above sequence.
Could you suggest to me a nice and elegant definition for this sequence: $5,13,43,61...$ (I don't know if it is infinite)
Could you find other terms with Pari if you want?
number-theory
number-theory
edited 2 days ago
homunculus
asked 2 days ago
homunculushomunculus
1869
1869
$begingroup$
@Barry Cipra any idea?
$endgroup$
– homunculus
2 days ago
$begingroup$
oeis.org/A147259
$endgroup$
– Don Thousand
2 days ago
$begingroup$
@Don Thousand are you sure is that?
$endgroup$
– homunculus
2 days ago
1
$begingroup$
The next terms in the sequence are $14897$ and $377942237 $.
$endgroup$
– Chip Hurst
2 days ago
2
$begingroup$
Chip Hurst record goes like this: $$377942237 mapsto 357721207 mapsto 338525531 mapsto 320305991 mapsto 303015169 mapsto 286608383 mapsto 271043027 mapsto 256278002$$
$endgroup$
– Jeppe Stig Nielsen
2 days ago
|
show 8 more comments
$begingroup$
@Barry Cipra any idea?
$endgroup$
– homunculus
2 days ago
$begingroup$
oeis.org/A147259
$endgroup$
– Don Thousand
2 days ago
$begingroup$
@Don Thousand are you sure is that?
$endgroup$
– homunculus
2 days ago
1
$begingroup$
The next terms in the sequence are $14897$ and $377942237 $.
$endgroup$
– Chip Hurst
2 days ago
2
$begingroup$
Chip Hurst record goes like this: $$377942237 mapsto 357721207 mapsto 338525531 mapsto 320305991 mapsto 303015169 mapsto 286608383 mapsto 271043027 mapsto 256278002$$
$endgroup$
– Jeppe Stig Nielsen
2 days ago
$begingroup$
@Barry Cipra any idea?
$endgroup$
– homunculus
2 days ago
$begingroup$
@Barry Cipra any idea?
$endgroup$
– homunculus
2 days ago
$begingroup$
oeis.org/A147259
$endgroup$
– Don Thousand
2 days ago
$begingroup$
oeis.org/A147259
$endgroup$
– Don Thousand
2 days ago
$begingroup$
@Don Thousand are you sure is that?
$endgroup$
– homunculus
2 days ago
$begingroup$
@Don Thousand are you sure is that?
$endgroup$
– homunculus
2 days ago
1
1
$begingroup$
The next terms in the sequence are $14897$ and $377942237 $.
$endgroup$
– Chip Hurst
2 days ago
$begingroup$
The next terms in the sequence are $14897$ and $377942237 $.
$endgroup$
– Chip Hurst
2 days ago
2
2
$begingroup$
Chip Hurst record goes like this: $$377942237 mapsto 357721207 mapsto 338525531 mapsto 320305991 mapsto 303015169 mapsto 286608383 mapsto 271043027 mapsto 256278002$$
$endgroup$
– Jeppe Stig Nielsen
2 days ago
$begingroup$
Chip Hurst record goes like this: $$377942237 mapsto 357721207 mapsto 338525531 mapsto 320305991 mapsto 303015169 mapsto 286608383 mapsto 271043027 mapsto 256278002$$
$endgroup$
– Jeppe Stig Nielsen
2 days ago
|
show 8 more comments
3 Answers
3
active
oldest
votes
$begingroup$
I believe your sequence continues forever but grows quickly. If $n$ is large, the density of primes around $n$ is $log n$. Since $log n$ is so much smaller than $n$, the chance a random $n$ has $k$ arrows is about $frac 1(log n)^k+1$. The expected number of sequences of length $k$ above $10^12,$ say, is then $int_10^12^infty frac dn(log n)^k+1$. This diverges because $(log n)^k$ becomes less than $n$ for $n$ large enough and we know the integral of $frac 1n$ diverges. Each subtraction is only of order $frac nlog n$, which is small compared to $n$ and the log will not change much.
If we ask what length of sequence we expect to find among the $12$ digit numbers, we note that the log of these numbers is about $29$ and that $29^8.5 approx 3cdot 10^12$. We would expect to find some sequences of $7$ arrows, maybe $8$ or $9$, and be surprised at $10$ or more. For $100$ digit numbers, the log is about $231$ and $231^42.5 approx 3cdot 10^100$, so we would expect some sequences of length $40$ or $41$ among the $100$ digit numbers.
$endgroup$
$begingroup$
thanks but a way to define the sequence? I am still thinkig about an elegant way to define it?
$endgroup$
– homunculus
2 days ago
$begingroup$
You have defined it nicely. Given $n$, see how many steps of primes you get and call it $f(n)$. Your sequence are then new maxima of $f(n)$. I strongly doubt there is a way other than searching to find the sixth or tenth term.
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
only even indexed primes after the first entry.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
@Ross Millikan but not all primes p ends the sequence with 1, isn't?
$endgroup$
– homunculus
2 days ago
$begingroup$
Formally, you can define your sequence like this: Let $phi$ be given by $$phi(p)=begincasesp-pi(p), & textif $p$ is prime\ textundefined, & textotherwiseendcases$$ For each prime $p$, let $f(p)$ denote the maximal number of times you can iterate $phi$ starting from $p$. For example $f(43)=4$ because we get the four-arrow chain $$43mapsto 29mapsto 19mapsto 11mapsto 6$$ and you cannot go on because $6$ is not prime. Then the sequence is defined as the $p$ for which $f(p)$ is record high. So a $p$ is in the sequence iff $f(p)$ is strictly greater than $f(q)$ for all $q<p$.
$endgroup$
– Jeppe Stig Nielsen
2 days ago
add a comment |
$begingroup$
`my(a=0,b=0);forprime(x=1,50000,y=x;while(isprime(y-primepi(y)),y-=primepi(y);b++);if(b>a,a=b;print(x));b=0)`
produces 14897 as the next one. Then no more below 500000. There's not too much to say except primes in the sequence will be primes at even indices after the first, simply because most primes are more than 2 away from their indices.
$endgroup$
$begingroup$
This supports my claim that they will grow rapidly. Thanks
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
can we get it to support valuation of 2 for the index ? so far they are all valuation 1. If that continues checking only every 4th prime is possible.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
I note that your code has 50,000, but the text below has 500,000. Did you check it to 50,000 or 500,000?
$endgroup$
– Paul Sinclair
2 days ago
$begingroup$
The later (in fact tried as high as 700,000) but only after posting the code.
$endgroup$
– Roddy MacPhee
2 days ago
add a comment |
$begingroup$
Using $S$ to denote the sequence you're trying to define, one may do so in
terms of two auxiliary functions $N$ and $L$, where $N$ assigns to every prime number $x$ a sequence whose first term, denoted by $(N(x))(0)$$^*$, is $x$ itself, and each next term, denoted by $(N(x))(n + 1)$, is given by $(N(x))(n) - pi((N(x))(n))$, and $L$ is the function which gives the number of terms of a sequence returned by $N$ up to when the first non-prime term is reached. $S$ is then defined to be such that the first term equals $5$, and given any term $S(n)$, the next term in the sequence is then the smallest prime number $p$ such that $L(N(p)) > L(N(S(n)))$.
In formula:
$S(0) = 5$
$S(n + 1) = langledownarrow p : p in mathbbP : L(N(p)) > L(N(S(n)))rangle$
$(N(x))(0) = x$
$(N(x))(n + 1) = (N(x))(n) - pi((N(x))(n))$
$L(N(x)) = langledownarrow n : n in mathbbN : (N(x))(n) notin
mathbbPrangle$
The notation $langledownarrow x : R(x) : T(x)rangle$ here denotes the minimum element $x$ that satisfies $T(x)$ from the set of all elements satisfying $R(x)$. $R(x)$ and $T(x)$ denote arbitrary predicates (i. e. boolean-valued functions) which generally depend on $x$.
$^*$Note: Here we use the definition that a sequence is any function whose domain consists of either all natural numbers or all natural numbers $n$ such that $0 le n lt m$ for arbitrary natural constant $m$. We admit $0$ as the smallest natural number.
$endgroup$
$begingroup$
I have edited this answer many times already, but I think I'm done now. I have performed a major clean-up on it by leaving the precise delineation of the domains and codomains of $S$, $N(x)$ and $L$ unspecified, as that degree of overspecification is completely irrelevant to the problem.
$endgroup$
– lucasb
yesterday
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3170629%2fan-elegant-way-to-define-a-sequence%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
I believe your sequence continues forever but grows quickly. If $n$ is large, the density of primes around $n$ is $log n$. Since $log n$ is so much smaller than $n$, the chance a random $n$ has $k$ arrows is about $frac 1(log n)^k+1$. The expected number of sequences of length $k$ above $10^12,$ say, is then $int_10^12^infty frac dn(log n)^k+1$. This diverges because $(log n)^k$ becomes less than $n$ for $n$ large enough and we know the integral of $frac 1n$ diverges. Each subtraction is only of order $frac nlog n$, which is small compared to $n$ and the log will not change much.
If we ask what length of sequence we expect to find among the $12$ digit numbers, we note that the log of these numbers is about $29$ and that $29^8.5 approx 3cdot 10^12$. We would expect to find some sequences of $7$ arrows, maybe $8$ or $9$, and be surprised at $10$ or more. For $100$ digit numbers, the log is about $231$ and $231^42.5 approx 3cdot 10^100$, so we would expect some sequences of length $40$ or $41$ among the $100$ digit numbers.
$endgroup$
$begingroup$
thanks but a way to define the sequence? I am still thinkig about an elegant way to define it?
$endgroup$
– homunculus
2 days ago
$begingroup$
You have defined it nicely. Given $n$, see how many steps of primes you get and call it $f(n)$. Your sequence are then new maxima of $f(n)$. I strongly doubt there is a way other than searching to find the sixth or tenth term.
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
only even indexed primes after the first entry.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
@Ross Millikan but not all primes p ends the sequence with 1, isn't?
$endgroup$
– homunculus
2 days ago
$begingroup$
Formally, you can define your sequence like this: Let $phi$ be given by $$phi(p)=begincasesp-pi(p), & textif $p$ is prime\ textundefined, & textotherwiseendcases$$ For each prime $p$, let $f(p)$ denote the maximal number of times you can iterate $phi$ starting from $p$. For example $f(43)=4$ because we get the four-arrow chain $$43mapsto 29mapsto 19mapsto 11mapsto 6$$ and you cannot go on because $6$ is not prime. Then the sequence is defined as the $p$ for which $f(p)$ is record high. So a $p$ is in the sequence iff $f(p)$ is strictly greater than $f(q)$ for all $q<p$.
$endgroup$
– Jeppe Stig Nielsen
2 days ago
add a comment |
$begingroup$
I believe your sequence continues forever but grows quickly. If $n$ is large, the density of primes around $n$ is $log n$. Since $log n$ is so much smaller than $n$, the chance a random $n$ has $k$ arrows is about $frac 1(log n)^k+1$. The expected number of sequences of length $k$ above $10^12,$ say, is then $int_10^12^infty frac dn(log n)^k+1$. This diverges because $(log n)^k$ becomes less than $n$ for $n$ large enough and we know the integral of $frac 1n$ diverges. Each subtraction is only of order $frac nlog n$, which is small compared to $n$ and the log will not change much.
If we ask what length of sequence we expect to find among the $12$ digit numbers, we note that the log of these numbers is about $29$ and that $29^8.5 approx 3cdot 10^12$. We would expect to find some sequences of $7$ arrows, maybe $8$ or $9$, and be surprised at $10$ or more. For $100$ digit numbers, the log is about $231$ and $231^42.5 approx 3cdot 10^100$, so we would expect some sequences of length $40$ or $41$ among the $100$ digit numbers.
$endgroup$
$begingroup$
thanks but a way to define the sequence? I am still thinkig about an elegant way to define it?
$endgroup$
– homunculus
2 days ago
$begingroup$
You have defined it nicely. Given $n$, see how many steps of primes you get and call it $f(n)$. Your sequence are then new maxima of $f(n)$. I strongly doubt there is a way other than searching to find the sixth or tenth term.
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
only even indexed primes after the first entry.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
@Ross Millikan but not all primes p ends the sequence with 1, isn't?
$endgroup$
– homunculus
2 days ago
$begingroup$
Formally, you can define your sequence like this: Let $phi$ be given by $$phi(p)=begincasesp-pi(p), & textif $p$ is prime\ textundefined, & textotherwiseendcases$$ For each prime $p$, let $f(p)$ denote the maximal number of times you can iterate $phi$ starting from $p$. For example $f(43)=4$ because we get the four-arrow chain $$43mapsto 29mapsto 19mapsto 11mapsto 6$$ and you cannot go on because $6$ is not prime. Then the sequence is defined as the $p$ for which $f(p)$ is record high. So a $p$ is in the sequence iff $f(p)$ is strictly greater than $f(q)$ for all $q<p$.
$endgroup$
– Jeppe Stig Nielsen
2 days ago
add a comment |
$begingroup$
I believe your sequence continues forever but grows quickly. If $n$ is large, the density of primes around $n$ is $log n$. Since $log n$ is so much smaller than $n$, the chance a random $n$ has $k$ arrows is about $frac 1(log n)^k+1$. The expected number of sequences of length $k$ above $10^12,$ say, is then $int_10^12^infty frac dn(log n)^k+1$. This diverges because $(log n)^k$ becomes less than $n$ for $n$ large enough and we know the integral of $frac 1n$ diverges. Each subtraction is only of order $frac nlog n$, which is small compared to $n$ and the log will not change much.
If we ask what length of sequence we expect to find among the $12$ digit numbers, we note that the log of these numbers is about $29$ and that $29^8.5 approx 3cdot 10^12$. We would expect to find some sequences of $7$ arrows, maybe $8$ or $9$, and be surprised at $10$ or more. For $100$ digit numbers, the log is about $231$ and $231^42.5 approx 3cdot 10^100$, so we would expect some sequences of length $40$ or $41$ among the $100$ digit numbers.
$endgroup$
I believe your sequence continues forever but grows quickly. If $n$ is large, the density of primes around $n$ is $log n$. Since $log n$ is so much smaller than $n$, the chance a random $n$ has $k$ arrows is about $frac 1(log n)^k+1$. The expected number of sequences of length $k$ above $10^12,$ say, is then $int_10^12^infty frac dn(log n)^k+1$. This diverges because $(log n)^k$ becomes less than $n$ for $n$ large enough and we know the integral of $frac 1n$ diverges. Each subtraction is only of order $frac nlog n$, which is small compared to $n$ and the log will not change much.
If we ask what length of sequence we expect to find among the $12$ digit numbers, we note that the log of these numbers is about $29$ and that $29^8.5 approx 3cdot 10^12$. We would expect to find some sequences of $7$ arrows, maybe $8$ or $9$, and be surprised at $10$ or more. For $100$ digit numbers, the log is about $231$ and $231^42.5 approx 3cdot 10^100$, so we would expect some sequences of length $40$ or $41$ among the $100$ digit numbers.
answered 2 days ago
Ross MillikanRoss Millikan
301k24200375
301k24200375
$begingroup$
thanks but a way to define the sequence? I am still thinkig about an elegant way to define it?
$endgroup$
– homunculus
2 days ago
$begingroup$
You have defined it nicely. Given $n$, see how many steps of primes you get and call it $f(n)$. Your sequence are then new maxima of $f(n)$. I strongly doubt there is a way other than searching to find the sixth or tenth term.
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
only even indexed primes after the first entry.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
@Ross Millikan but not all primes p ends the sequence with 1, isn't?
$endgroup$
– homunculus
2 days ago
$begingroup$
Formally, you can define your sequence like this: Let $phi$ be given by $$phi(p)=begincasesp-pi(p), & textif $p$ is prime\ textundefined, & textotherwiseendcases$$ For each prime $p$, let $f(p)$ denote the maximal number of times you can iterate $phi$ starting from $p$. For example $f(43)=4$ because we get the four-arrow chain $$43mapsto 29mapsto 19mapsto 11mapsto 6$$ and you cannot go on because $6$ is not prime. Then the sequence is defined as the $p$ for which $f(p)$ is record high. So a $p$ is in the sequence iff $f(p)$ is strictly greater than $f(q)$ for all $q<p$.
$endgroup$
– Jeppe Stig Nielsen
2 days ago
add a comment |
$begingroup$
thanks but a way to define the sequence? I am still thinkig about an elegant way to define it?
$endgroup$
– homunculus
2 days ago
$begingroup$
You have defined it nicely. Given $n$, see how many steps of primes you get and call it $f(n)$. Your sequence are then new maxima of $f(n)$. I strongly doubt there is a way other than searching to find the sixth or tenth term.
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
only even indexed primes after the first entry.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
@Ross Millikan but not all primes p ends the sequence with 1, isn't?
$endgroup$
– homunculus
2 days ago
$begingroup$
Formally, you can define your sequence like this: Let $phi$ be given by $$phi(p)=begincasesp-pi(p), & textif $p$ is prime\ textundefined, & textotherwiseendcases$$ For each prime $p$, let $f(p)$ denote the maximal number of times you can iterate $phi$ starting from $p$. For example $f(43)=4$ because we get the four-arrow chain $$43mapsto 29mapsto 19mapsto 11mapsto 6$$ and you cannot go on because $6$ is not prime. Then the sequence is defined as the $p$ for which $f(p)$ is record high. So a $p$ is in the sequence iff $f(p)$ is strictly greater than $f(q)$ for all $q<p$.
$endgroup$
– Jeppe Stig Nielsen
2 days ago
$begingroup$
thanks but a way to define the sequence? I am still thinkig about an elegant way to define it?
$endgroup$
– homunculus
2 days ago
$begingroup$
thanks but a way to define the sequence? I am still thinkig about an elegant way to define it?
$endgroup$
– homunculus
2 days ago
$begingroup$
You have defined it nicely. Given $n$, see how many steps of primes you get and call it $f(n)$. Your sequence are then new maxima of $f(n)$. I strongly doubt there is a way other than searching to find the sixth or tenth term.
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
You have defined it nicely. Given $n$, see how many steps of primes you get and call it $f(n)$. Your sequence are then new maxima of $f(n)$. I strongly doubt there is a way other than searching to find the sixth or tenth term.
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
only even indexed primes after the first entry.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
only even indexed primes after the first entry.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
@Ross Millikan but not all primes p ends the sequence with 1, isn't?
$endgroup$
– homunculus
2 days ago
$begingroup$
@Ross Millikan but not all primes p ends the sequence with 1, isn't?
$endgroup$
– homunculus
2 days ago
$begingroup$
Formally, you can define your sequence like this: Let $phi$ be given by $$phi(p)=begincasesp-pi(p), & textif $p$ is prime\ textundefined, & textotherwiseendcases$$ For each prime $p$, let $f(p)$ denote the maximal number of times you can iterate $phi$ starting from $p$. For example $f(43)=4$ because we get the four-arrow chain $$43mapsto 29mapsto 19mapsto 11mapsto 6$$ and you cannot go on because $6$ is not prime. Then the sequence is defined as the $p$ for which $f(p)$ is record high. So a $p$ is in the sequence iff $f(p)$ is strictly greater than $f(q)$ for all $q<p$.
$endgroup$
– Jeppe Stig Nielsen
2 days ago
$begingroup$
Formally, you can define your sequence like this: Let $phi$ be given by $$phi(p)=begincasesp-pi(p), & textif $p$ is prime\ textundefined, & textotherwiseendcases$$ For each prime $p$, let $f(p)$ denote the maximal number of times you can iterate $phi$ starting from $p$. For example $f(43)=4$ because we get the four-arrow chain $$43mapsto 29mapsto 19mapsto 11mapsto 6$$ and you cannot go on because $6$ is not prime. Then the sequence is defined as the $p$ for which $f(p)$ is record high. So a $p$ is in the sequence iff $f(p)$ is strictly greater than $f(q)$ for all $q<p$.
$endgroup$
– Jeppe Stig Nielsen
2 days ago
add a comment |
$begingroup$
`my(a=0,b=0);forprime(x=1,50000,y=x;while(isprime(y-primepi(y)),y-=primepi(y);b++);if(b>a,a=b;print(x));b=0)`
produces 14897 as the next one. Then no more below 500000. There's not too much to say except primes in the sequence will be primes at even indices after the first, simply because most primes are more than 2 away from their indices.
$endgroup$
$begingroup$
This supports my claim that they will grow rapidly. Thanks
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
can we get it to support valuation of 2 for the index ? so far they are all valuation 1. If that continues checking only every 4th prime is possible.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
I note that your code has 50,000, but the text below has 500,000. Did you check it to 50,000 or 500,000?
$endgroup$
– Paul Sinclair
2 days ago
$begingroup$
The later (in fact tried as high as 700,000) but only after posting the code.
$endgroup$
– Roddy MacPhee
2 days ago
add a comment |
$begingroup$
`my(a=0,b=0);forprime(x=1,50000,y=x;while(isprime(y-primepi(y)),y-=primepi(y);b++);if(b>a,a=b;print(x));b=0)`
produces 14897 as the next one. Then no more below 500000. There's not too much to say except primes in the sequence will be primes at even indices after the first, simply because most primes are more than 2 away from their indices.
$endgroup$
$begingroup$
This supports my claim that they will grow rapidly. Thanks
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
can we get it to support valuation of 2 for the index ? so far they are all valuation 1. If that continues checking only every 4th prime is possible.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
I note that your code has 50,000, but the text below has 500,000. Did you check it to 50,000 or 500,000?
$endgroup$
– Paul Sinclair
2 days ago
$begingroup$
The later (in fact tried as high as 700,000) but only after posting the code.
$endgroup$
– Roddy MacPhee
2 days ago
add a comment |
$begingroup$
`my(a=0,b=0);forprime(x=1,50000,y=x;while(isprime(y-primepi(y)),y-=primepi(y);b++);if(b>a,a=b;print(x));b=0)`
produces 14897 as the next one. Then no more below 500000. There's not too much to say except primes in the sequence will be primes at even indices after the first, simply because most primes are more than 2 away from their indices.
$endgroup$
`my(a=0,b=0);forprime(x=1,50000,y=x;while(isprime(y-primepi(y)),y-=primepi(y);b++);if(b>a,a=b;print(x));b=0)`
produces 14897 as the next one. Then no more below 500000. There's not too much to say except primes in the sequence will be primes at even indices after the first, simply because most primes are more than 2 away from their indices.
answered 2 days ago
Roddy MacPheeRoddy MacPhee
640118
640118
$begingroup$
This supports my claim that they will grow rapidly. Thanks
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
can we get it to support valuation of 2 for the index ? so far they are all valuation 1. If that continues checking only every 4th prime is possible.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
I note that your code has 50,000, but the text below has 500,000. Did you check it to 50,000 or 500,000?
$endgroup$
– Paul Sinclair
2 days ago
$begingroup$
The later (in fact tried as high as 700,000) but only after posting the code.
$endgroup$
– Roddy MacPhee
2 days ago
add a comment |
$begingroup$
This supports my claim that they will grow rapidly. Thanks
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
can we get it to support valuation of 2 for the index ? so far they are all valuation 1. If that continues checking only every 4th prime is possible.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
I note that your code has 50,000, but the text below has 500,000. Did you check it to 50,000 or 500,000?
$endgroup$
– Paul Sinclair
2 days ago
$begingroup$
The later (in fact tried as high as 700,000) but only after posting the code.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
This supports my claim that they will grow rapidly. Thanks
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
This supports my claim that they will grow rapidly. Thanks
$endgroup$
– Ross Millikan
2 days ago
$begingroup$
can we get it to support valuation of 2 for the index ? so far they are all valuation 1. If that continues checking only every 4th prime is possible.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
can we get it to support valuation of 2 for the index ? so far they are all valuation 1. If that continues checking only every 4th prime is possible.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
I note that your code has 50,000, but the text below has 500,000. Did you check it to 50,000 or 500,000?
$endgroup$
– Paul Sinclair
2 days ago
$begingroup$
I note that your code has 50,000, but the text below has 500,000. Did you check it to 50,000 or 500,000?
$endgroup$
– Paul Sinclair
2 days ago
$begingroup$
The later (in fact tried as high as 700,000) but only after posting the code.
$endgroup$
– Roddy MacPhee
2 days ago
$begingroup$
The later (in fact tried as high as 700,000) but only after posting the code.
$endgroup$
– Roddy MacPhee
2 days ago
add a comment |
$begingroup$
Using $S$ to denote the sequence you're trying to define, one may do so in
terms of two auxiliary functions $N$ and $L$, where $N$ assigns to every prime number $x$ a sequence whose first term, denoted by $(N(x))(0)$$^*$, is $x$ itself, and each next term, denoted by $(N(x))(n + 1)$, is given by $(N(x))(n) - pi((N(x))(n))$, and $L$ is the function which gives the number of terms of a sequence returned by $N$ up to when the first non-prime term is reached. $S$ is then defined to be such that the first term equals $5$, and given any term $S(n)$, the next term in the sequence is then the smallest prime number $p$ such that $L(N(p)) > L(N(S(n)))$.
In formula:
$S(0) = 5$
$S(n + 1) = langledownarrow p : p in mathbbP : L(N(p)) > L(N(S(n)))rangle$
$(N(x))(0) = x$
$(N(x))(n + 1) = (N(x))(n) - pi((N(x))(n))$
$L(N(x)) = langledownarrow n : n in mathbbN : (N(x))(n) notin
mathbbPrangle$
The notation $langledownarrow x : R(x) : T(x)rangle$ here denotes the minimum element $x$ that satisfies $T(x)$ from the set of all elements satisfying $R(x)$. $R(x)$ and $T(x)$ denote arbitrary predicates (i. e. boolean-valued functions) which generally depend on $x$.
$^*$Note: Here we use the definition that a sequence is any function whose domain consists of either all natural numbers or all natural numbers $n$ such that $0 le n lt m$ for arbitrary natural constant $m$. We admit $0$ as the smallest natural number.
$endgroup$
$begingroup$
I have edited this answer many times already, but I think I'm done now. I have performed a major clean-up on it by leaving the precise delineation of the domains and codomains of $S$, $N(x)$ and $L$ unspecified, as that degree of overspecification is completely irrelevant to the problem.
$endgroup$
– lucasb
yesterday
add a comment |
$begingroup$
Using $S$ to denote the sequence you're trying to define, one may do so in
terms of two auxiliary functions $N$ and $L$, where $N$ assigns to every prime number $x$ a sequence whose first term, denoted by $(N(x))(0)$$^*$, is $x$ itself, and each next term, denoted by $(N(x))(n + 1)$, is given by $(N(x))(n) - pi((N(x))(n))$, and $L$ is the function which gives the number of terms of a sequence returned by $N$ up to when the first non-prime term is reached. $S$ is then defined to be such that the first term equals $5$, and given any term $S(n)$, the next term in the sequence is then the smallest prime number $p$ such that $L(N(p)) > L(N(S(n)))$.
In formula:
$S(0) = 5$
$S(n + 1) = langledownarrow p : p in mathbbP : L(N(p)) > L(N(S(n)))rangle$
$(N(x))(0) = x$
$(N(x))(n + 1) = (N(x))(n) - pi((N(x))(n))$
$L(N(x)) = langledownarrow n : n in mathbbN : (N(x))(n) notin
mathbbPrangle$
The notation $langledownarrow x : R(x) : T(x)rangle$ here denotes the minimum element $x$ that satisfies $T(x)$ from the set of all elements satisfying $R(x)$. $R(x)$ and $T(x)$ denote arbitrary predicates (i. e. boolean-valued functions) which generally depend on $x$.
$^*$Note: Here we use the definition that a sequence is any function whose domain consists of either all natural numbers or all natural numbers $n$ such that $0 le n lt m$ for arbitrary natural constant $m$. We admit $0$ as the smallest natural number.
$endgroup$
$begingroup$
I have edited this answer many times already, but I think I'm done now. I have performed a major clean-up on it by leaving the precise delineation of the domains and codomains of $S$, $N(x)$ and $L$ unspecified, as that degree of overspecification is completely irrelevant to the problem.
$endgroup$
– lucasb
yesterday
add a comment |
$begingroup$
Using $S$ to denote the sequence you're trying to define, one may do so in
terms of two auxiliary functions $N$ and $L$, where $N$ assigns to every prime number $x$ a sequence whose first term, denoted by $(N(x))(0)$$^*$, is $x$ itself, and each next term, denoted by $(N(x))(n + 1)$, is given by $(N(x))(n) - pi((N(x))(n))$, and $L$ is the function which gives the number of terms of a sequence returned by $N$ up to when the first non-prime term is reached. $S$ is then defined to be such that the first term equals $5$, and given any term $S(n)$, the next term in the sequence is then the smallest prime number $p$ such that $L(N(p)) > L(N(S(n)))$.
In formula:
$S(0) = 5$
$S(n + 1) = langledownarrow p : p in mathbbP : L(N(p)) > L(N(S(n)))rangle$
$(N(x))(0) = x$
$(N(x))(n + 1) = (N(x))(n) - pi((N(x))(n))$
$L(N(x)) = langledownarrow n : n in mathbbN : (N(x))(n) notin
mathbbPrangle$
The notation $langledownarrow x : R(x) : T(x)rangle$ here denotes the minimum element $x$ that satisfies $T(x)$ from the set of all elements satisfying $R(x)$. $R(x)$ and $T(x)$ denote arbitrary predicates (i. e. boolean-valued functions) which generally depend on $x$.
$^*$Note: Here we use the definition that a sequence is any function whose domain consists of either all natural numbers or all natural numbers $n$ such that $0 le n lt m$ for arbitrary natural constant $m$. We admit $0$ as the smallest natural number.
$endgroup$
Using $S$ to denote the sequence you're trying to define, one may do so in
terms of two auxiliary functions $N$ and $L$, where $N$ assigns to every prime number $x$ a sequence whose first term, denoted by $(N(x))(0)$$^*$, is $x$ itself, and each next term, denoted by $(N(x))(n + 1)$, is given by $(N(x))(n) - pi((N(x))(n))$, and $L$ is the function which gives the number of terms of a sequence returned by $N$ up to when the first non-prime term is reached. $S$ is then defined to be such that the first term equals $5$, and given any term $S(n)$, the next term in the sequence is then the smallest prime number $p$ such that $L(N(p)) > L(N(S(n)))$.
In formula:
$S(0) = 5$
$S(n + 1) = langledownarrow p : p in mathbbP : L(N(p)) > L(N(S(n)))rangle$
$(N(x))(0) = x$
$(N(x))(n + 1) = (N(x))(n) - pi((N(x))(n))$
$L(N(x)) = langledownarrow n : n in mathbbN : (N(x))(n) notin
mathbbPrangle$
The notation $langledownarrow x : R(x) : T(x)rangle$ here denotes the minimum element $x$ that satisfies $T(x)$ from the set of all elements satisfying $R(x)$. $R(x)$ and $T(x)$ denote arbitrary predicates (i. e. boolean-valued functions) which generally depend on $x$.
$^*$Note: Here we use the definition that a sequence is any function whose domain consists of either all natural numbers or all natural numbers $n$ such that $0 le n lt m$ for arbitrary natural constant $m$. We admit $0$ as the smallest natural number.
edited yesterday
answered 2 days ago
lucasblucasb
212
212
$begingroup$
I have edited this answer many times already, but I think I'm done now. I have performed a major clean-up on it by leaving the precise delineation of the domains and codomains of $S$, $N(x)$ and $L$ unspecified, as that degree of overspecification is completely irrelevant to the problem.
$endgroup$
– lucasb
yesterday
add a comment |
$begingroup$
I have edited this answer many times already, but I think I'm done now. I have performed a major clean-up on it by leaving the precise delineation of the domains and codomains of $S$, $N(x)$ and $L$ unspecified, as that degree of overspecification is completely irrelevant to the problem.
$endgroup$
– lucasb
yesterday
$begingroup$
I have edited this answer many times already, but I think I'm done now. I have performed a major clean-up on it by leaving the precise delineation of the domains and codomains of $S$, $N(x)$ and $L$ unspecified, as that degree of overspecification is completely irrelevant to the problem.
$endgroup$
– lucasb
yesterday
$begingroup$
I have edited this answer many times already, but I think I'm done now. I have performed a major clean-up on it by leaving the precise delineation of the domains and codomains of $S$, $N(x)$ and $L$ unspecified, as that degree of overspecification is completely irrelevant to the problem.
$endgroup$
– lucasb
yesterday
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3170629%2fan-elegant-way-to-define-a-sequence%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
@Barry Cipra any idea?
$endgroup$
– homunculus
2 days ago
$begingroup$
oeis.org/A147259
$endgroup$
– Don Thousand
2 days ago
$begingroup$
@Don Thousand are you sure is that?
$endgroup$
– homunculus
2 days ago
1
$begingroup$
The next terms in the sequence are $14897$ and $377942237 $.
$endgroup$
– Chip Hurst
2 days ago
2
$begingroup$
Chip Hurst record goes like this: $$377942237 mapsto 357721207 mapsto 338525531 mapsto 320305991 mapsto 303015169 mapsto 286608383 mapsto 271043027 mapsto 256278002$$
$endgroup$
– Jeppe Stig Nielsen
2 days ago