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

A323073 Number of iterations of A049820(x) = x - A000005(x) needed to reach either zero or such x that x and A049820(x) are coprime, when starting from x = n.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 2, 0, 1, 3, 3, 0, 3, 0, 4, 0, 0, 0, 4, 0, 5, 0, 5, 0, 1, 0, 6, 0, 6, 0, 6, 0, 7, 0, 7, 0, 1, 0, 8, 0, 8, 0, 8, 0, 9, 1, 9, 0, 9, 0, 10, 0, 10, 0, 10, 0, 10, 0, 11, 0, 10, 0, 12, 1, 0, 0, 12, 0, 13, 0, 13, 0, 11, 0, 14, 1, 14, 0, 14, 0, 14, 0, 15, 0, 12, 0, 16, 0, 15, 0, 15, 0, 17, 0, 16, 0, 13, 0
Offset: 0

Views

Author

Antti Karttunen, Jan 05 2019

Keywords

Crossrefs

Cf. A046642 (positions of zeros after the initial a(0)=0).

Programs

  • PARI
    A323073(n) = if(!n,0,my(nn=(n-numdiv(n))); if(1==gcd(n,nn),0,1+A323073(nn)));
    
  • PARI
    A323073(n) = if(!n,0,for(j=0,oo,my(nn=(n-numdiv(n))); if((0==nn)||(1==gcd(n,nn)),return(j+(2==n)),n = nn)));

Formula

a(0) = 0; for n > 0, if A009191(n) == 1, a(n) = 0, otherwise a(n) = 1 + a(n-A000005(n)).
a(n) <= A155043(n).

A320002 a(0) = 1; for n > 0, a(n) = A002828(n) * a(n-A002828(n)), where A002828(n) is the least number of squares that add up to n.

Original entry on oeis.org

1, 1, 2, 3, 3, 6, 9, 12, 18, 18, 36, 54, 54, 108, 162, 216, 216, 432, 432, 648, 864, 1296, 1944, 2592, 3888, 3888, 7776, 11664, 15552, 23328, 34992, 46656, 69984, 104976, 139968, 209952, 209952, 419904, 629856, 839808, 1259712, 1679616, 2519424, 3779136, 5038848, 7558272, 11337408, 15116544, 22674816, 22674816, 45349632
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2018

Keywords

Comments

Product of A002828(x) computed over all x encountered when map x -> x - A002828(x) is iterated, starting from x = n, until 0 is reached.
Sequence is monotonic because A255131 is monotonic.
All terms are 3-smooth (A003586).

Crossrefs

Programs

  • Mathematica
    Nest[Append[#1, #2 #1[[-#2]] ] & @@ {#, If[First@ # > 0, 1, Length@ First@ Split@ # + 1] &@ SquaresR[Range@ 4, Length@ #]} &, {1}, 50] (* Michael De Vlieger, Nov 25 2018, after Harvey P. Dale at A002828 *)
  • PARI
    istwo(n:int) = { my(f); if(n<3, return(n>=0); ); f=factor(n>>valuation(n, 2)); for(i=1, #f[, 1], if(bitand(f[i, 2], 1)==1&&bitand(f[i, 1], 3)==3, return(0))); 1 };
    isthree(n:int) = { my(tmp=valuation(n, 2)); bitand(tmp, 1)||bitand(n>>tmp, 7)!=7 };
    A002828(n) = if(issquare(n), !!n, if(istwo(n), 2, 4-isthree(n))); \\ From A002828
    A255131(n) = (n-A002828(n));
    A320002(n) = { my(m=1, v); while(n>0, v = A002828(n); m *= v; n -= v); (m); };
    
  • PARI
    A320002(n) = if(0==n,1,A002828(n)*A320002(n-A002828(n)));

Formula

a(0) = 1; for n > 0, a(n) = A002828(n) * a(n-A002828(n)).

A320008 a(0) = 1; for n > 0, a(n) = A000120(n) * a(n-A000120(n)), where A000120(n) is the binary weight of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 4, 6, 6, 12, 12, 18, 24, 36, 54, 72, 72, 144, 144, 216, 288, 432, 648, 864, 1296, 1944, 2592, 3456, 5832, 7776, 10368, 12960, 12960, 25920, 25920, 38880, 51840, 77760, 116640, 155520, 233280, 349920, 466560, 622080, 1049760, 1399680, 1866240, 2332800, 3732480, 5598720, 6998400, 9331200, 16796160, 22394880, 27993600, 34992000
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2018

Keywords

Comments

Sequence is monotonic because A011371 is.

Crossrefs

Programs

  • Mathematica
    Nest[Append[#1, #2 #1[[-#2]] ] & @@ {#, Total@ IntegerDigits[Length@ #, 2]} &, {1}, 55] (* Michael De Vlieger, Nov 25 2018 *)
  • PARI
    A320008(n) = if(0==n,1,hammingweight(n)*A320008(n-hammingweight(n)));

Formula

a(0) = 1; for n > 0, a(n) = A000120(n) * a(n-A000120(n)).

A320016 a(1) = a(2) = 1; for n > 2, a(n) = A000005(n) * a(A000005(n)), where A000005(n) gives the number of divisors of n.

Original entry on oeis.org

1, 1, 2, 6, 2, 24, 2, 24, 6, 24, 2, 144, 2, 24, 24, 10, 2, 144, 2, 144, 24, 24, 2, 192, 6, 24, 24, 144, 2, 192, 2, 144, 24, 24, 24, 54, 2, 24, 24, 192, 2, 192, 2, 144, 144, 24, 2, 240, 6, 144, 24, 144, 2, 192, 24, 192, 24, 24, 2, 1728, 2, 24, 144, 14, 24, 192, 2, 144, 24, 192, 2, 1728, 2, 24, 144, 144, 24, 192, 2, 240, 10, 24, 2, 1728
Offset: 1

Views

Author

Antti Karttunen, Nov 24 2018

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,1];; for n in [3..100] do a[n]:=Tau(n)*a[Tau(n)]; od; a; # Muniru A Asiru, Nov 24 2018
  • Mathematica
    Nest[Append[#1, #2 #1[[#2]] ] & @@ {#, DivisorSigma[0, Length@ # + 1]} &, {1, 1}, 82] (* Michael De Vlieger, Nov 25 2018 *)
  • PARI
    A320016(n) = if(n<=2,1,numdiv(n)*A320016(numdiv(n)));
    

Formula

a(1) = a(2) = 1; for n > 2, a(n) = A000005(n) * a(A000005(n)), where A000005(n) gives the number of divisors of n.
Showing 1-4 of 4 results.