cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-8 of 8 results.

A007097 Primeth recurrence: a(n+1) = a(n)-th prime.

Original entry on oeis.org

1, 2, 3, 5, 11, 31, 127, 709, 5381, 52711, 648391, 9737333, 174440041, 3657500101, 88362852307, 2428095424619, 75063692618249, 2586559730396077, 98552043847093519, 4123221751654370051, 188272405179937051081, 9332039515881088707361, 499720579610303128776791, 28785866289100396890228041
Offset: 0

Views

Author

Keywords

Comments

A007097(n) = Min {k : A109301(k) = n} = the first k whose rote height is n, the level set leader or minimum inverse function corresponding to A109301. - Jon Awbrey, Jun 26 2005
Lubomir Alexandrov informs me that he studied this sequence in his 1965 notebook. - N. J. A. Sloane, May 23 2008
a(n) is the Matula-Goebel number of the rooted path tree on n+1 vertices. The Matula-Goebel number of a rooted tree can be defined in the following recursive manner: to the one-vertex tree there corresponds the number 1; to a tree T with root degree 1 there corresponds the t-th prime number, where t is the Matula-Goebel number of the tree obtained from T by deleting the edge emanating from the root; to a tree T with root degree m>=2 there corresponds the product of the Matula-Goebel numbers of the m branches of T. - Emeric Deutsch, Feb 18 2012
Conjecture: log(a(1))*log(a(2))*...*log(a(n)) ~ a(n). - Thomas Ordowski, Mar 26 2015

References

  • Lubomir Alexandrov, unpublished notes, circa 1960.
  • L. Longeri, Towards understanding nature and the aesthetics of prime numbers, https://www.longeri.org/prime/nature.html [Broken link, but leave the URL here for historical reasons]
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row 1 of array A114537.
Left edge of tree A227413, right edge of A246378.
Cf. A078442, A109082 (left inverses).
Subsequence of A245823.

Programs

  • GAP
    P:=Filtered([1..60000],IsPrime);;
    a:=[1];; for n in [2..10] do a[n]:=P[a[n-1]]; od; a; # Muniru A Asiru, Dec 22 2018
  • Haskell
    a007097 n = a007097_list !! n
    a007097_list = iterate a000040 1  -- Reinhard Zumkeller, Jul 14 2013
    
  • Maple
    seq((ithprime@@n)(1),n=0..10); # Peter Luschny, Oct 16 2012
  • Mathematica
    NestList[Prime@# &, 1, 16] (* Robert G. Wilson v, May 30 2006 *)
  • PARI
    print1(p=1);until(,print1(","p=prime(p)))  \\ M. F. Hasler, Oct 09 2011
    

Formula

A049084(a(n+1)) = a(n). - Reinhard Zumkeller, Jul 14 2013
a(n)/a(n-1) ~ log(a(n)) ~ prime(n). - Thomas Ordowski, Mar 26 2015
a(n) = prime^{[n]}(1), with the prime function prime(k) = A000040(k), with a(0) = 1. See the name and the programs. - Wolfdieter Lang, Apr 03 2018
Sum_{n>=1} 1/a(n) = A292667. - Amiram Eldar, Oct 15 2020

Extensions

a(15) corrected and a(16)-a(17) added by Paul Zimmermann
a(18)-a(19) found by David Baugh using a program by Xavier Gourdon and Andrey V. Kulsha, Oct 25 2007
a(20)-a(21) found by Andrey V. Kulsha using a program by Xavier Gourdon, Oct 02 2011
a(22) from Henri Lifchitz, Oct 14 2014
a(23) from David Baugh using Kim Walisch's primecount, May 16 2016

A245821 Permutation of natural numbers: a(n) = A091205(A245703(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 7, 6, 8, 12, 11, 15, 23, 81, 18, 10, 17, 30, 13, 162, 27, 36, 19, 24, 16, 25, 38, 46, 37, 45, 31, 135, 14, 20, 50, 57, 47, 69, 21, 55, 83, 115, 419, 87, 60, 210, 61, 42, 54, 26, 90, 28, 29, 35, 32, 63, 171, 52, 59, 138, 113, 180, 111, 48, 88, 39, 41, 621, 72, 22, 953, 230, 103, 207, 126, 64, 33, 243
Offset: 1

Views

Author

Antti Karttunen, Aug 02 2014

Keywords

Crossrefs

Inverse: A245822.
Other related permutations: A091205, A245703, A245815.
Fixed points: A245823.

Programs

  • PARI
    allocatemem(234567890);
    v014580 = vector(2^18);
    v091226 = vector(2^22);
    v091242 = vector(2^22);
    isA014580(n)=polisirreducible(Pol(binary(n))*Mod(1, 2)); \\ This function from Charles R Greathouse IV
    i=0; j=0; n=2; while((n < 2^22), if(isA014580(n), i++; v014580[i] = n; v091226[n] = v091226[n-1]+1, j++; v091242[j] = n; v091226[n] = v091226[n-1]); n++);
    A014580(n) = v014580[n];
    A091226(n) = v091226[n];
    A091242(n) = v091242[n];
    A091205(n) = if(n<=1, n, if(isA014580(n), prime(A091205(A091226(n))), {my(irfs, t); irfs=subst(lift(factor(Mod(1, 2)*Pol(binary(n)))), x, 2); irfs[,1]=apply(t->A091205(t), irfs[,1]); factorback(irfs)}));
    A245703(n) = if(1==n, 1, if(isprime(n), A014580(A245703(primepi(n))), A091242(A245703(n-primepi(n)-1))));
    A245821(n) = A091205(A245703(n));
    for(n=1, 10001, write("b245821.txt", n, " ", A245821(n)));
    
  • Scheme
    (define (A245821 n) (A091205 (A245703 n)))

Formula

a(n) = A091205(A245703(n)).
Other identities. For all n >= 1, the following holds:
A078442(a(n)) = A078442(n), A049076(a(n)) = A049076(n). [Preserves "the order of primeness of n"].
a(p_n) = p_{a(n)} where p_n is the n-th prime, A000040(n).
a(n) = A049084(a(A000040(n))). [Thus the same permutation is induced also when it is restricted to primes].
A245815(n) = A062298(a(A018252(n))). [While restriction to nonprimes induces another permutation].

A245822 Permutation of natural numbers: a(n) = A245704(A091204(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 9, 6, 16, 11, 10, 19, 33, 12, 25, 17, 15, 23, 34, 39, 70, 13, 24, 26, 50, 21, 52, 53, 18, 31, 55, 77, 93, 54, 22, 29, 27, 66, 105, 67, 48, 137, 156, 30, 28, 37, 64, 91, 35, 85, 58, 97, 49, 40, 98, 36, 135, 59, 45, 47, 261, 56, 76, 92, 122, 83, 374, 38, 102, 139, 69, 167, 130, 88, 203, 351, 212, 349, 235, 14
Offset: 1

Views

Author

Antti Karttunen, Aug 02 2014

Keywords

Crossrefs

Inverse: A245821.
Other related permutations: A091204, A245704, A245816.
Fixed points: A245823.

Programs

Formula

a(n) = A245704(A091204(n)).
Other identities. For all n >= 1, the following holds:
A078442(a(n)) = A078442(n), A049076(a(n)) = A049076(n). [Preserves "the order of primeness of n"].
a(p_n) = p_{a(n)} where p_n is the n-th prime, A000040(n).
a(n) = A049084(a(A000040(n))). [Thus the same permutation is induced also when it is restricted to primes].
A245816(n) = A062298(a(A018252(n))). [While restriction to nonprimes induces another permutation].

A245815 Permutation of natural numbers induced when A245821 is restricted to nonprime numbers: a(n) = A062298(A245821(A018252(n))).

Original entry on oeis.org

1, 2, 5, 3, 4, 7, 9, 59, 11, 6, 20, 125, 18, 25, 15, 10, 16, 26, 32, 31, 103, 8, 12, 35, 41, 50, 13, 39, 85, 64, 43, 164, 29, 38, 17, 66, 19, 24, 21, 45, 132, 37, 105, 139, 82, 33, 65, 27, 507, 52, 14, 180, 161, 96, 46, 22, 190, 141, 87, 1603, 80, 36, 143, 107, 54, 670, 34, 47, 23, 68, 177, 1337, 40
Offset: 1

Views

Author

Antti Karttunen, Aug 02 2014

Keywords

Comments

This permutation is induced when A245821 is restricted to nonprimes, A018252, the first column of A114537, but equally, when it is restricted to column 2 (A007821), column 3 (A049078), etc. of that square array, or alternatively, to the successive rows of A236542.
The sequence of fixed points f(n) begins as 1, 2, 15, 142, 548, 1694, 54681. A018252(f(n)) gives the nonprime terms of A245823.

Crossrefs

Inverse: A245816.
Related permutations: A245813, A245819, A245821.

Programs

Formula

a(n) = A062298(A245821(A018252(n))).
As a composition of related permutations:
a(n) = A245813(A245819(n)).
Also following holds for all n >= 1:

A245816 Permutation of natural numbers induced when A245822 is restricted to nonprime numbers: a(n) = A062298(A245822(A018252(n))).

Original entry on oeis.org

1, 2, 4, 5, 3, 10, 6, 22, 7, 16, 9, 23, 27, 51, 15, 17, 35, 13, 37, 11, 39, 56, 69, 38, 14, 18, 48, 78, 33, 120, 20, 19, 46, 67, 24, 62, 42, 34, 28, 73, 25, 103, 31, 206, 40, 55, 68, 92, 300, 26, 76, 50, 99, 65, 157, 281, 165, 184, 8, 121, 134, 277, 423, 30, 47, 36, 223, 70, 514, 75, 101, 116, 236, 139, 74
Offset: 1

Views

Author

Antti Karttunen, Aug 02 2014

Keywords

Comments

This permutation is induced when A245822 is restricted to nonprimes, A018252, the first column of A114537, but equally, when it is restricted to column 2 (A007821), column 3 (A049078), etc. of that square array, or alternatively, to the successive rows of A236542.
The sequence of fixed points f(n) begins as 1, 2, 15, 142, 548, 1694, 54681. A018252(f(n)) gives the nonprime terms of A245823.

Crossrefs

Inverse: A245815.
Related permutations: A245814, A245820, A245822.

Programs

Formula

a(n) = A062298(A245822(A018252(n))).
As a composition of related permutations:
a(n) = A245820(A245814(n)).
Also following holds for all n >= 1:
etc.

A250251 Fixed points of A250249 and A250250.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 40, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 56, 58, 59, 60, 61, 62, 64, 67, 68, 70, 71, 72, 74, 76, 77, 79, 80, 82, 83, 86, 88, 89, 92, 94, 96, 97, 98, 100, 101, 104, 106, 107, 109, 112, 113, 116, 118, 120, 121
Offset: 1

Views

Author

Antti Karttunen, Nov 18 2014

Keywords

Comments

Numbers for which A250249(n) = n (equally: A250250(n) = n).
If n is a member, then 2n is also a member. If any 2n is a member, then n is also a member. If n is a member, then the n-th prime, p_n (= A000040(n)) is also a member. If p_n is a member, then its index n is also a member. Thus the sequence is completely determined by its odd nonprime terms: 1, 9, 15, 25, ..., (A249730) and is obtained as a union of their multiples with powers of 2, and all prime recurrences that start with those values: A007097 U A057450 U A057451 U A057452 U A057453 U ..., etc.

Crossrefs

Complement: A249729.
Subsequences: A249730, and also A007097, A057450, A057451, A057452, A057453, etc.
Cf. also A245823, A250249, A250250.

A245817 Difference in size between rooted trees which are encoded as Matula-Goebel numbers A245821(n) and n: a(n) = A061775(A245821(n)) - A061775(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 1, 1, 4, 0, 0, 0, 1, 0, 4, 1, 1, -1, 0, -2, 1, -1, 1, 0, 1, 0, 4, -2, 0, 1, 0, 1, 2, -1, 1, 1, 2, 4, 1, 0, 3, 0, 0, 1, -2, 2, -1, 0, -1, -2, 1, 2, 0, 0, 1, 1, 3, 0, 0, 0, -1, 0, 5, 0, -2, 4, 2, 1, 3, 0, 0, -1, 3, 1, 1, 0, 5, -1, 1, -1, 2, 1, 1, 0, 4, -1, 0, -2, 0, 3, 5, -2, -1, 0
Offset: 1

Views

Author

Antti Karttunen, Aug 16 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A061775(A245821(n)) - A061775(n).
Other identities. For all n >= 1, the following holds:
a(A000040(n)) = a(n). [The result for the n-th prime is same as for n itself].
a(A245823(n)) = 0. [A245823 gives a (proper) subsequence of the positions of the zeros].

A245818 Difference in size between rooted trees which are encoded with Matula-Goebel numbers A245822(n) and n: a(n) = A061775(A245822(n)) - A061775(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 2, -1, 2, 0, 0, 1, 0, 1, 2, -1, 0, -1, 2, -1, 1, 0, -1, 0, 2, 1, 2, 1, -1, 0, 1, 1, 2, 0, 0, 2, 2, -1, -1, -1, 0, 1, -1, 1, 0, 2, -1, -1, 1, 0, 3, 0, 0, 0, 3, -1, 0, 0, 0, 1, 3, -2, 0, 0, 0, 1, 2, -1, 2, 3, 0, 2, 2, -4, 1, -1, 1, 3, 4, -1, 0, 0, -2, 1, 0, 1, 1, 0, 0, -1, 1, 1, 0
Offset: 1

Views

Author

Antti Karttunen, Aug 16 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A061775(A245822(n)) - A061775(n).
Other identities. For all n >= 1, the following holds:
a(A000040(n)) = a(n). [The result for the n-th prime is same as for n itself].
a(A245823(n)) = 0. [A245823 gives a (proper) subsequence of the positions of the zeros].
Showing 1-8 of 8 results.