A069974 Duplicate of A039650.
2, 2, 3, 3, 5, 3, 7, 5, 7, 5, 11, 5, 13, 7, 7, 7, 17, 7, 19, 7, 13, 11, 23, 7, 13, 13, 19, 13, 29
Offset: 1
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.
a039649 = (+ 1) . a000010 -- Reinhard Zumkeller, Oct 07 2015
[EulerPhi(n)+1: n in [1..100]]; // Vincenzo Librandi, Aug 13 2013
Table[EulerPhi[n] + 1, {n, 100}] (* Vincenzo Librandi, Aug 13 2013 *)
a(n)=eulerphi(n)+1 \\ Charles R Greathouse IV, Mar 04 2017
[0] cat [DivisorSigma(1, n)-1: n in [1..100]]; // Vincenzo Librandi, May 02 2015
with(numtheory): A039653:=n->sigma(n)-1: (0, seq(A039653(n), n=1..100)); # Wesley Ivan Hurt, Jul 09 2015
Join[{0}, Table[DivisorSigma[1, n] - 1, {n, 90}]] (* Vincenzo Librandi, May 02 2015 *)
A039653(n) = if(!n,n,sigma(n)-1); \\ Antti Karttunen, May 26 2017
from sympy import divisor_sigma def A039653(n): return divisor_sigma(n)-1 if n else 0 # Chai Wah Wu, Mar 14 2023
f[n_]:=Plus@@Divisors[n]-1;Table[Nest[f,n,6],{n,2,5!}] (* Vladimir Joseph Stephan Orlovsky, Mar 10 2010 *) f[n_] := DivisorSigma[1,n]-1; Table[FixedPoint[f,n], {n,2,100}] (* T. D. Noe, May 10 2010 *)
a(n)=local(m);if(n<2,0,while((m=sigma(n)-1)!=n,n=m);n) \\ Franklin T. Adams-Watters, May 10 2010
A039654(n)=n>1&&until(n==n=sigma(n)-1,);n \\ M. F. Hasler, Sep 25 2017
f[n_] := Plus @@ Divisors@n - 1; g[n_] := Length@ NestWhileList[ f@# &, n, !PrimeQ@# &] - 1; Table[ g@n, {n, 2, 106}] (* Robert G. Wilson v, May 07 2010 *)
a(n)=my(t);while(!isprime(n),n=sigma(n)-1;t++);t \\ Charles R Greathouse IV, Sep 16 2014
Table[Length[NestWhileList[EulerPhi[#] + 1 &, n, UnsameQ, All]] - 2, {n, 100}] (* T. D. Noe, Oct 17 2013 *)
nn = 34; t = Table[0, {nn}]; found = 0; n = 0; While[found < nn, n++; len = Length[NestWhileList[EulerPhi[#] + 1 &, n, UnsameQ, All]] - 2; If[len <= nn && t[[len]] == 0, t[[len]] = n; found++]]; t = Join[{2}, t] (* T. D. Noe, Oct 17 2013 *)
f[n_] := Plus @@ Divisors@ n -1; g[n_] := Length@ NestWhileList[f@# &, n, !PrimeQ@# &] - 1; t[] := -1; k = 2; While[k < 10000001, a = g[k]; If[ t@ a == -1, t@ a = k; Print[{a, k}]]; k++]; t@# & /@ Range[0, 50] (* _Robert G. Wilson v, Sep 22 2017 *)
a(3) = 4 because x = { 5, 8, 10, 12 } are the 4 numbers from which the iteration x -> phi(x) + 1 terminates at prime(3) = 5. a(4) = 8 because x = { 7, 9, 14, 15, 16, 18, 20, 24, 30 } are the 9 numbers from which the iteration x -> phi(x) + 1 terminates at prime(4) = 7.
iterat(x) = {my(k,s); if ( isprime(x),return(x)); s=x; for (k=1,1000000000,s=eulerphi(s)+1;if(isprime(s),return(s))); return(s); } check(y,endrange) = {my(count,start); count=0; for(start=1,endrange,if(iterat(start)==y,count++;)); return(count); } for (n=1,93,x=prime(n);print1(check(x,1000000),", ")) \\ Hugo Pfoertner, Sep 23 2017
Table[-4*((n - 1)*(n + 1)^(n + 1) + 1)/(((-1)^n - 3)*n^3), {n,1,50}] (* G. C. Greubel, Feb 19 2017 *)
makelist(-4*((n-1)*(n+1)^(n+1)+1)/(((-1)^n-3)*n^3),n,1,20); /* Martin Ettl, Jan 25 2013 */
for(n=1,25, print1(-4*((n - 1)*(n + 1)^(n + 1) + 1)/(((-1)^n - 3)*n^3), ", ")) \\ G. C. Greubel, Feb 19 2017
Comments