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-10 of 12 results. Next

A086353 Fixed point if nonzero-digit product of n! is iterated.

Original entry on oeis.org

1, 2, 6, 8, 2, 4, 2, 8, 8, 8, 6, 1, 2, 8, 8, 8, 8, 6, 8, 8, 8, 8, 8, 2, 2, 8, 4, 8, 6, 2, 2, 6, 1, 8, 8, 8, 2, 2, 6, 8, 8, 8, 8, 8, 8, 6, 8, 6, 8, 8, 8, 6, 6, 1, 8, 8, 5, 8, 6, 6, 8, 6, 8, 2, 8, 8, 8, 6, 8, 2, 8, 8, 2, 6, 6, 8, 9, 6, 8, 8, 6, 2, 2, 8, 8, 8, 8, 4, 6, 8, 9, 6, 2, 2, 8, 2, 8, 8, 4, 4, 8, 8, 6, 2, 8
Offset: 1

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Examples

			n=10, 10!=362880, iteration list={3628800,2304,24,8},a(10)=8.
		

Crossrefs

Programs

  • Mathematica
    prd[x_] := Apply[Times, DeleteCases[IntegerDigits[x], 0]] Table[FixedPoint[prd, w! ], {w, 1, 128}]

Formula

a(n)=A051802[n! ]=fixed-point of A051801[n! ]

A023287 Primes that remain prime through 3 iterations of function f(x) = 6x + 1.

Original entry on oeis.org

61, 101, 1811, 3491, 4091, 5711, 5801, 6361, 7121, 10391, 10771, 11311, 13421, 15131, 17791, 18911, 19471, 20011, 24391, 25601, 25951, 30091, 35251, 41911, 45631, 47431, 55631, 58711, 62921, 67891, 70451, 70571, 72271, 74051, 74161, 75431, 80471, 86341
Offset: 1

Views

Author

Keywords

Comments

Primes p such that s1=p, s2=6*s1+1, s3=6*s2+1 and s4=6*s3+1 are primes forming a special chain of four primes. A fifth term in such a chain cannot arise. See A085956, A086361, A086362.
Entries in chains are congruent to {1,7,3,9} mod 10.

Examples

			First chain is {61, 367, 2203, 13219};
319th chain is {1291391, 7748347, 46490083, 278940499}.
		

Crossrefs

Subsequence of A007693, A023256, and A024899.

Programs

  • Magma
    [n: n in [1..150000] | IsPrime(n) and IsPrime(6*n+1) and IsPrime(36*n+7) and IsPrime(216*n+43)] // Vincenzo Librandi, Aug 04 2010
  • Mathematica
    k=0; m=6; Do[s=Prime[n]; s1=m*s+1; s2=m*s1+1; s3=m*s2+1; If[PrimeQ[s1]&&PrimeQ[s2]&&PrimeQ[s3], k=k+1; Print[{k, n, s, s1, s2, s3}]], {n, 1, 100000}] (* edited by Zak Seidov, Feb 08 2011 *)
    thrQ[n_]:=AllTrue[Rest[NestList[6#+1&,n ,3]],PrimeQ]; Select[Prime[Range[9000]],thrQ] (* Harvey P. Dale, Mar 03 2024 *)

Formula

{p, 6p+1, 36p+7, 216p+43} are all primes, where p is prime.

Extensions

Additional comments from Labos Elemer, Jul 23 2003

A086362 a(n) = A085956(3n+1).

Original entry on oeis.org

5, 17, 239, 41, 131, 1889, 419, 89, 101, 113, 2543, 2789, 149, 881, 173, 9293, 491, 14249, 3191, 1973, 3539, 21377, 7103, 281, 5987, 38153, 317, 2789, 6971, 353, 214943, 42677, 3299, 11801, 2267, 27773, 29867, 10529, 461, 1181, 2663, 129209
Offset: 0

Views

Author

Labos Elemer, Jul 22 2003

Keywords

Comments

A086361 and A086362 includes most probably the solvable [or small?] cases of A085956, where n=3k-1 has probably only two solutions, at [k,n,a(n)]=[1,2,13] and at [2,5,31].

Examples

			n=50:3n+1=151,6n+2=302, a(50)=93923 prime with (93922-1)/302=311, prime and with 302.93923+1=28364747 prime; so the {311,93923,28364747} "generalized [short] Cunningham-chain" is defined.
		

Crossrefs

Programs

  • Mathematica
    Table[Function[m, p = 2; While[Nand @@ PrimeQ@ {2 m p + 1, (p - 1)/(2 m)}, p = NextPrime@ p]; p][3 n + 1], {n, 0, 41}] (* Michael De Vlieger, May 15 2017 *)

A023347 Primes which remain prime through 5 iterations of function f(x) = 8x + 1.

Original entry on oeis.org

831167, 1154567, 2502767, 3019787, 3675197, 5056577, 6352487, 14519177, 26724377, 43003577, 47378927, 47695607, 56406197, 86332457, 86611757, 99568757, 121967987, 126435527, 127990997, 128149127, 128975057, 145281557, 155715407
Offset: 1

Views

Author

Keywords

Examples

			First chain is {831167, 6649337, 53194697, 425557577, 3404460617, 27235684937};
If p is congruent to {1,3,7,9} mod 10, then consecutive iterates are congruent to {9,5,7,3}, {3,1,7,5}, {5,9,7,1} respectively; so only 10k+7 may remain prime through five iterations, as sequence demonstrates nicely. - _Labos Elemer_, Jul 23 2003
		

Crossrefs

Programs

  • Mathematica
    k=0; m=8; Do[s=Prime[n]; s1=m*s+1; s2=m*s1+1; s3=m*s2+1; s4=m*s3+1; s5=m*s4+1; If[PrimeQ[s]&&PrimeQ[s1]&&PrimeQ[s2]&&PrimeQ[s3]&&PrimeQ[s4]&&PrimeQ[s5], k=k+1; Print[s]], {n, 1, 1000000}]
    it5Q[n_]:=AllTrue[Rest[NestList[8#+1&,n,5]],PrimeQ]; Select[Prime[Range[ 9*10^6]],it5Q] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 12 2014 *)

Formula

{p, 8p+1, 64p+9, 512p+73, 4096p+585, 32768p+4681} are all primes, where the initial p is prime.
a(n) == 197 (mod 210). - John Cerkan, Nov 04 2016

A086358 Digital root of n!.

Original entry on oeis.org

1, 1, 2, 6, 6, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 0

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Comments

a(n) = 9 for n >= 6.

Examples

			n = 5, 5 != 120, iteration list = {120,3}, a(5) = 3.
		

Crossrefs

Programs

  • Mathematica
    sud[x_] := Apply[Plus, DeleteCases[IntegerDigits[x], 0]]; Table[FixedPoint[sud, w!], {w, 1, 87}]

Formula

a(n) = A010888(n!) = fixed-point of A007953(n!). It equals n! modulo(9); at r = 0 use 9.
G.f.: (1 + x^2 + 4*x^3 - 3*x^5 + 6*x^6)/(1 - x). - Stefano Spezia, Jan 26 2023

Extensions

a(0) = 1 prepended by Alois P. Heinz, Dec 05 2018

A086360 The n-th primorial number reduced modulo 9.

Original entry on oeis.org

1, 2, 6, 3, 3, 6, 6, 3, 3, 6, 3, 3, 3, 6, 6, 3, 6, 3, 3, 3, 6, 6, 6, 3, 6, 6, 3, 3, 6, 6, 3, 3, 6, 3, 3, 6, 6, 6, 6, 3, 6, 3, 3, 6, 6, 3, 3, 3, 3, 6, 6, 3, 6, 6, 3, 6, 3, 6, 6, 6, 3, 3, 6, 6, 3, 3, 6, 6, 6, 3, 3, 6, 3, 3, 3, 3, 6, 3, 3, 6, 6, 3, 3, 6, 6, 6, 3, 6
Offset: 0

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Comments

a(n) is the fixed point reached by decimal-digit-sum-function (A007953), when starting the iteration from the value of the n-th primorial, A002110(n). - The (edited) original definition of the sequence, which is equal to a simple definition a(n) = A002110(n) mod 9, because taking the decimal digit sum preserves congruence modulo 9. - Antti Karttunen, Nov 14 2024
Only a(0)=1 and a(1)=2; each subsequent term is either a 3 or a 6.

Examples

			For n=7, 7th primorial = 510510, list of iterated digit sums is {510510,12,3}, thus a(7)=3.
		

Crossrefs

Programs

  • Maple
    A086360 := proc(n) option remember: if(n=1)then return 2:fi: return ithprime(n)*procname(n-1) mod 9: end: seq(A086360(n), n=1..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    sud[x_] := Apply[Plus, DeleteCases[IntegerDigits[x], 0]] q[x_] := Apply[Times, Table[Prime[w], {w, 1, x}]] Table[FixedPoint[sud, q[w]], {w, 1, 128}]
  • PARI
    up_to = 19683;
    A086360list(up_to_n) = { my(m=9, v=vector(1+up_to_n), pr=1); v[1] = 1; for(n=1, up_to_n, pr = (pr*prime(n))%m; v[1+n] = pr); (v); };
    v086360 = A086360list(up_to);
    A086360(n) = v086360[1+n]; \\ Antti Karttunen, Nov 14 2024

Formula

a(n) = A010878(A002110(n)) = A002110(n) mod 9.
a(n) = A010888(A002110(n)).

Extensions

Term a(0)=1 prepended, old definition moved to comments and replaced with one of the formulas, keyword:base removed because not really base-dependent - Antti Karttunen, Nov 14 2024

A086354 Fixed point if (nonzero-digit product)-function at initial value 2^n is iterated.

Original entry on oeis.org

2, 4, 8, 6, 6, 8, 6, 6, 1, 8, 8, 2, 6, 2, 2, 4, 8, 2, 1, 6, 2, 2, 6, 8, 2, 8, 2, 8, 2, 2, 8, 6, 6, 2, 2, 6, 2, 2, 6, 8, 8, 6, 3, 4, 2, 2, 6, 6, 2, 8, 6, 2, 2, 9, 8, 6, 6, 5, 8, 2, 8, 8, 2, 6, 2, 8, 8, 8, 5, 8, 8, 8, 2, 8, 6, 4, 8, 6, 2, 7, 1, 8, 8, 4, 2, 8, 8
Offset: 1

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Examples

			n=20, 2^20=1048576, iteration list={1048576,6720,84,32,6}, so a(20)=6.
		

Crossrefs

Programs

  • Maple
    A051801 := proc(n) local d,j: d:=convert(n,base,10): return mul(`if`(d[j]=0,1,d[j]), j=1..nops(d)): end: A086354 := proc(n) local m: m:=2^n: while(length(m)>1)do m:=A051801(m): od: return m: end: seq(A086354(n),n=1..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    prd[x_] := Apply[Times, DeleteCases[IntegerDigits[x], 0]] Table[FixedPoint[prd, 2^w], {w, 1, 128}]

Formula

a(n) = A051802(2^n) = fixed point of A051801(2^n).

A086127 Numbers k such that k remains prime after five iteration of function f(j) = 14*f(j)+1, starting at f(1) = prime.

Original entry on oeis.org

4889, 18059, 62639, 225527, 557093, 604973, 700703, 804077, 806903, 837077, 1341203, 1363403, 1932197, 2004269, 2062703, 2284637, 2797463, 3157379, 3493103, 3746399, 3995687, 4155413, 4227893, 4493297, 5534939, 5708603
Offset: 1

Views

Author

Labos Elemer, Jul 23 2003

Keywords

Comments

{p, 14p+1, 196p+15, 2744p+211, 38416p+2955, 537824p+41371} are all primes, where p is prime.

Examples

			First chain is: {4889,68447,958259,13415627,187818779,2629462907}.
10th chain is {837077,11719079,164067107,2296939499,32157152987,450200141819}.
		

Crossrefs

Programs

  • Mathematica
    k=0; m=14; Do[s=Prime[n]; s1=m*s+1; s2=m*s1+1; s3=m*s2+1; s4=m*s3+1; s5=m*s4+1; If[PrimeQ[s]&&PrimeQ[s1]&&PrimeQ[s2]&&PrimeQ[s3]&&PrimeQ[s4]&&PrimeQ[s5], k=k+1; Print[s]], {n, 1, 1000000}]
    Select[Range[6000000],And@@PrimeQ[NestList[14#+1&,#,5]]&] (* Harvey P. Dale, Sep 17 2012 *)

A086355 Fixed point if [nonzero-digit product]-function at initial-value=prime(n) is iterated.

Original entry on oeis.org

2, 3, 5, 7, 1, 3, 7, 9, 6, 8, 3, 2, 4, 2, 6, 5, 2, 6, 8, 7, 2, 8, 8, 4, 8, 1, 3, 7, 9, 3, 4, 3, 2, 4, 8, 5, 5, 8, 8, 2, 8, 8, 9, 4, 8, 8, 2, 2, 6, 8, 8, 2, 8, 1, 7, 8, 8, 4, 4, 6, 6, 2, 2, 3, 9, 2, 9, 8, 6, 8, 2, 5, 2, 8, 4, 4, 2, 4, 4, 8, 8, 8, 2, 8, 8, 6, 6, 4, 8, 4, 6, 2, 6, 8, 8, 5, 2, 1, 3, 2, 4, 5, 9, 4, 5
Offset: 1

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Examples

			n=100, prime(100)=541, iteration list={541,20,2}, a(100)=2.
		

Crossrefs

Programs

  • Mathematica
    prd[x_] := Apply[Times, DeleteCases[IntegerDigits[x], 0]]; Table[FixedPoint[prd, Prime[w]], {w, 1, 128}]

Formula

a(n) = A051802(A000040(n)) = fixed-point of A051801(n-th prime).

A086356 Fixed point if [nonzero-digit product]-function at initial-value=C[2n,n]=central binomial coefficient is iterated.

Original entry on oeis.org

2, 6, 2, 7, 2, 4, 4, 2, 2, 6, 6, 6, 8, 6, 5, 8, 8, 4, 8, 2, 9, 8, 6, 8, 6, 2, 8, 8, 2, 8, 6, 2, 6, 6, 8, 2, 6, 6, 6, 8, 9, 2, 2, 8, 2, 8, 2, 8, 6, 4, 2, 2, 8, 8, 2, 8, 6, 8, 2, 8, 6, 8, 9, 6, 6, 2, 6, 2, 2, 2, 8, 6, 8, 6, 8, 2, 8, 8, 8, 8, 8, 8, 6, 2, 6, 2, 8, 6, 8, 8, 8, 8, 8, 6, 8, 8, 6, 8, 2, 8, 2, 8, 6, 8, 8
Offset: 1

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Examples

			n=10, C[20,10]=184756, iteration list={184756,7560,210,2},
a(100)=2.
		

Crossrefs

Programs

  • Mathematica
    prd[x_] := Apply[Times, DeleteCases[IntegerDigits[x], 0]] Table[FixedPoint[prd, Binomial[2*n, n]], {w, 1, 128}]

Formula

a(n)=A051802[A000984(n)]=fixed-point of A051801[C(2n, n)]
Showing 1-10 of 12 results. Next