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

A324920 a(n) is the number of iterations of the integer splitting function (A056737) necessary to reach zero.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Mar 20 2019

Keywords

Comments

The iterations always fall to zero, proof by induction: 0 is 0; 1 -> 0; 2 -> 1; 3 -> 2; 4 -> 2; n -> some number less than n.
First occurrence of k >= 0: 0, 1, 2, 3, 10, 11, 26, 83, 178, ... see A324921.

Examples

			a(0) = 0;
a(1) = 1 since 1 -> 0;
a(2) = 2 since 2 -> 1 -> 0;
a(3) = 3 since 3 -> 2 -> 1 -> 0;
a(4) = 1 since 4 -> 0; etc.
		

Crossrefs

Programs

  • Mathematica
    g[n_] := Block[{d = Divisors@n}, len = Length@d; If[ OddQ@ len, 0, d[[1 + len/2]] - d[[len/2]]]]; f[n_] := Length@ NestWhileList[f, n, # > 0 &] -1; Array[f, 105, 0]
  • PARI
    a056737(n)=n=divisors(n); n[(2+#n)\2]-n[(1+#n)\2] \\ after M. F. Hasler in A056737
    a(n) = my(x=n, i=0); while(x!=0, i++; x=a056737(x)); i \\ Felix Fröhlich, Mar 20 2019

Formula

a(n) = 1 iff n is a perfect square (A000290).

A307034 a(n) is the smallest integer k of the form k = x*(x + a(n-1)), such that A324920(k) = n, for some positive integer x, with a(0) = 0.

Original entry on oeis.org

0, 1, 2, 3, 10, 11, 26, 87, 178, 179, 362, 1835, 22164, 155197, 620804, 5587317, 55873270, 167619819, 1340958616, 57661222337, 345967334058, 25255615391563, 858690923314298, 4293454616571515, 60108364632001406, 3185743325496077327, 178401626227780333448, 1605614636050023001113
Offset: 0

Views

Author

Daniel Suteu and Robert G. Wilson v, Mar 23 2019

Keywords

Comments

Inspired by A324921.
This sequence provides upper bounds for A324921, i.e.: A324921(n) <= a(n).

Crossrefs

Programs

  • PARI
    f(n) = my(d=divisors(n)); d[(2+#d)\2]-d[(1+#d)\2]; \\ A056737
    g(n) = my(k=0); while(n!=0, k++; n=f(n)); k; \\ A324920
    a(n) = if(n <= 0, return(0)); my(t=a(n-1)); for(k=1, oo, if(g(k*(k+t)) == n, return(k*(k+t))));
Showing 1-2 of 2 results.