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-6 of 6 results.

A294656 Size of the orbit of n under iteration of the map A125256: x -> smallest odd prime divisor of n^2+1.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Nov 06 2017

Keywords

Comments

The orbit or trajectory under A125256 appears to end in the cycle 5 -> 13 -> 5 -> etc. for any initial value n.
Sequence A294658 gives the number of steps to reach either 5 or 13, i.e. an element of this terminating cycle. Therefore a(n) (which counts these two elements as well as the initial value) is 2 more than A294658(n) for all n. This is confirmed by careful examination of special cases - assuming, of course, that all trajectories end in the cycle (5, 13).

Examples

			For n = 1 the map A125256 is not defined.
a(2) = 3 = # { 2, 5, 13 }, because under A125256, 2 -> 2^2+1 = 5 (= its smallest odd prime factor), 5 -> least odd prime factor(5^2+1 = 26) = 13, 13 -> least odd prime factor(13^2 + 1 = 170 = 2*5*17) = 5, etc.
a(3) = 3 = # { 3, 5, 13 }, because under A125256, 3 -> smallest odd prime factor(3^2+1 = 10) = 5, 5 -> 13, 13 -> 5 etc.
a(4) = 4 = # { 4, 17, 5, 13 }, because under A125256, 4 -> 4^2+1 = 17 (= its smallest odd prime factor), 17 -> smallest odd prime factor(17^2+1 = 290 = 2*5*29) = 5, 5 -> 13, 13 -> 5 etc.
		

Crossrefs

Cf. A125256, A294657: largest number in the orbit, A294658: number of steps to reach the cycle (5, 13).

Programs

  • PARI
    A294656(n,f=A125256,S=[n])={while(#S<#S=setunion(S,[n=f(n)]),); #S} \\ Does not assume the terminating cycle is (5, 13): also works correctly in case there are other terminating cycles.

Formula

a(n) = A294658(n) + 2.

A294657 Largest number in the orbit of n under iteration of the map A125256: x -> smallest odd prime divisor of n^2+1.

Original entry on oeis.org

13, 13, 17, 13, 37, 13, 13, 421, 5101, 1861, 13, 13, 197, 113, 257, 17, 18, 16381, 401, 21, 22, 23, 577, 313, 677, 27, 28, 421, 30, 31, 32, 33, 34, 613, 1297, 37, 38, 761, 1601, 421, 42, 43, 44, 1013, 421, 47, 48, 1201, 421, 1301, 52, 53, 2917, 55, 3137, 57, 58, 1515541, 60
Offset: 2

Views

Author

M. F. Hasler, Nov 06 2017

Keywords

Comments

The orbit (or trajectory) under A125256 appears to end in the cycle 5 -> 13 -> 5 -> etc. for any initial value n.

Crossrefs

Cf. A125256, A294656 (size of the orbit).

Programs

  • Mathematica
    Table[Max[NestWhileList[SelectFirst[FactorInteger[#^2+1][[All,1]], OddQ]&, n,#!=13&]],{n,2,60}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 04 2019 *)
  • PARI
    A294657(n,S=[n])={while(#S<#S=setunion(S,[n=A125256(n)]),); vecmax(S)}

A294658 Number of steps required to reach either 5 or 13, starting with n, when iterating the map A125256: x -> smallest odd prime divisor of n^2+1; or a(n) = -1 in case 5 is never reached.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Nov 06 2017

Keywords

Comments

The orbit or trajectory under A125256 appears to end in the cycle 5 -> 13 -> 5 -> etc. for any initial value n.
Sequence A294656 gives the size of the complete orbit of n under the map A125256, including the two elements 5 and 13 of the terminating cycle. Thus a(n) is 2 less than A294656(n) for all n. This is confirmed by careful examination of special cases - assuming, of course, that all trajectories end in the cycle (5, 13).

Examples

			For n = 1 the map A125256 is not defined.
a(2) = 1 because under A125256, 2 -> 2^2+1 = 5 (= its smallest odd prime factor), so 5 is reached after just a(2) = 1 iteration of this map.
a(3) = 1 because A125256(3) = 5, least odd prime factor of 3^2+1 = 10 = 2*5, so here again 5 is reached after just a(2) = 1 iteration of A125256.
a(4) = 2 because A125256(4) = 4^2 + 1 = 17, and A125256(17) = 5 = least odd prime factor of 17^2 + 1 = 289 + 1 = 2*5*29, so 5 is reached after a(4) = 2 iterations of A125256.
a(5) = a(13) = 0 because for these initial values 5 and 13, no iteration is needed until either 5 or 13 is reached.
		

Crossrefs

Programs

  • PARI
    A294658(n)=for(k=0,oo,bittest(8224,n)&&return(k);n=A125256(n)) \\ 8224 = 2^5 + 2^13. One could add 2^0 + 2^1 = 3 to avoid an error message for initial values 0 and 1, for which A125256 is not defined.

Formula

a(n) = A294656(n) - 2.

A031439 a(0) = 1, a(n) is the greatest prime factor of a(n-1)^2+1 for n > 0.

Original entry on oeis.org

1, 2, 5, 13, 17, 29, 421, 401, 53, 281, 3037, 70949, 1713329, 1467748131121, 37142837524296348426149, 101591133424866642486477019709, 1650979973845742266714536305651329, 78343914631785958284737, 4029445531112797145738746391569, 350080544438648120162733678636001, 26208090024628793745288451837610346882122253572537, 4717815978577117335515270825550279551117660519482308365269206484133871485221
Offset: 0

Views

Author

Keywords

Comments

Does this sequence grow indefinitely, or does it cycle? - Franklin T. Adams-Watters, Oct 02 2006
All a(n) except a(0) = 1 belong to A014442(n) = {2, 5, 5, 17, 13, 37, 5, 13, 41, 101, ...} Largest prime factor of n^2 + 1. All a(n) except a(0) = 1 belong to A002313(n) = {2, 5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, ...} Primes congruent to 1 or 2 modulo 4; or, primes of form x^2+y^2; or, -1 is a square mod p. All a(n) except a(0) = 1 and a(1) = 2 are the Pythagorean primes A002144(n) = {5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, ...} Primes of form 4n+1. - Alexander Adamchuk, Nov 05 2006
Essentially the same as A072268; A072268(n) = A031439(n-1)^2 + 1. - Charles R Greathouse IV, May 08 2009

Examples

			a(16)=A006530(a(15)^2+1)=
A006530(101591133424866642486477019709^2+1)=
A006530(10320758390549056348725939119133160378521185060950774444682)=
A006530(2*29*23201*4645528280970018601*1650979973845742266714536305651329)=
1650979973845742266714536305651329, factorization of A006530(a(15)^2+1) by Dario A. Alpern's program (see link).
		

Crossrefs

Cf. A002144 - Pythagorean primes: primes of form 4n+1; A002313 - Primes congruent to 1 or 2 modulo 4; A014442 - Largest prime factor of n^2 + 1.

Programs

  • Mathematica
    gpf[n_] := FactorInteger[n][[-1, 1]]; a[0] = 1; a[n_] := a[n] = gpf[a[n - 1]^2 + 1]; Table[an = a[n]; Print[an]; an, {n, 0, 21}] (* Jean-François Alcover, Nov 04 2011 *)
    NestList[FactorInteger[#^2+1][[-1,1]]&,1,21] (* Harvey P. Dale, Jul 04 2013 *)
  • PARI
    gpf(n)=local(pf);pf=factor(n);pf[matsize(pf)[1],1] vector(20,i,r=if(i==1,1,gpf(r^2+1)))

Extensions

One more term from Vladeta Jovovic, Nov 26 2001
a(16) from Reinhard Zumkeller, Aug 07 2004
a(17)-a(21) from Richard FitzHugh (fitzhughrichard(AT)hotmail.com), Aug 12 2004

A256970 Smallest prime divisor of 4*n^2+1.

Original entry on oeis.org

5, 17, 37, 5, 101, 5, 197, 257, 5, 401, 5, 577, 677, 5, 17, 5, 13, 1297, 5, 1601, 5, 13, 29, 5, 41, 5, 2917, 3137, 5, 13, 5, 17, 4357, 5, 13, 5, 5477, 53, 5, 37, 5, 7057, 13, 5, 8101, 5, 8837, 13, 5, 73, 5, 29, 17, 5, 12101, 5, 41, 13457, 5
Offset: 1

Views

Author

N. J. A. Sloane, Apr 19 2015

Keywords

Comments

a(n) = A020639(A053755(n)).
If the map "x -> smallest odd prime divisor of n^2+1" is iterated, does it always terminate in the 2-cycle (5 <-> 13)? - Zoran Sunic, Oct 25 2017

References

  • Richard Friedberg, An Adventurer's Guide to Number Theory, McGraw-Hill, NY, 1968.
  • Popular Computing (Calabasas, CA), Friedberg's Sequence, Vol. 5 (No. 46, Jan 1977), page PC46-2.

Crossrefs

A bisection of A125256.

Programs

A293958 Smallest odd prime divisor of (2n+1)^2 + 1.

Original entry on oeis.org

5, 13, 5, 41, 61, 5, 113, 5, 181, 13, 5, 313, 5, 421, 13, 5, 613, 5, 761, 29, 5, 1013, 5, 1201, 1301, 5, 17, 5, 1741, 1861, 5, 2113, 5, 2381, 2521, 5, 29, 5, 3121, 17, 5, 3613, 5, 17, 41, 5, 4513, 5, 13, 5101, 5, 37, 5, 13, 61, 5, 17, 5, 73, 7321, 5, 13, 5, 53, 8581, 5, 13, 5, 9661, 9941, 5
Offset: 1

Views

Author

N. J. A. Sloane, Nov 04 2017, following a suggestion from Zoran Sunic

Keywords

Comments

If the map "x -> smallest odd prime divisor of n^2+1" is iterated, does it always terminate in the 2-cycle (5 <-> 13)? - Zoran Sunic, Oct 25 2017
A027862 is a subsequence. - David A. Corneth, Nov 04 2017

Crossrefs

A bisection of A125256. Cf. A027862, A069894, A078701, A256970.

Programs

  • Mathematica
    sod[n_]:=With[{fi=FactorInteger[n]},If[fi[[1,1]]==2,fi[[2,1]],fi[1,1]]]; sod/@(Range[3,151,2]^2+1) (* Harvey P. Dale, Dec 23 2023 *)
  • PARI
    a(n) = factor((2*n+1)^2 + 1)[2,1]; \\ Michel Marcus, Nov 04 2017

Formula

a(n) = A078701(A069894(n)). - Michel Marcus, Nov 04 2017
Showing 1-6 of 6 results.