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

A376793 Numbers k such that k and k+1 are both in A376616.

Original entry on oeis.org

1, 1424, 2484, 4304, 4655, 6223, 10624, 13824, 20624, 22784, 29448, 33424, 33984, 36944, 41535, 43263, 45184, 45324, 65744, 66199, 68624, 69632, 70784, 74304, 74627, 99584, 103103, 103424, 105720, 114704, 120680, 139904, 147636, 164224, 166144, 192576, 199968
Offset: 1

Views

Author

Amiram Eldar, Oct 04 2024

Keywords

Examples

			1424 is a term since both 1424 and 1425 are in A376616: 1424/A000120(1424) = 356 and 356/A000120(356) = 89 are integers, and 1425/A000120(1425) = 285 and 285/A000120(285) = 57 are integers.
		

Crossrefs

Subsequence of A330931 and A376616.
Subsequences: A376794, A376795.
Cf. A000120.

Programs

  • Mathematica
    q[k_] := q[k] = Module[{w = DigitCount[k, 2, 1]}, Divisible[k, w] && Divisible[k/w, DigitCount[k/w, 2, 1]]]; Select[Range[20000], q[#] && q[#+1] &]
  • PARI
    is1(k) = {my(w = hammingweight(k)); !(k % w) && !((k/w) % hammingweight(k/w));}
    lista(kmax) = {my(q1 = is1(1), q2); for(k = 2, kmax, q2 = is1(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);}

A376794 Starts of runs of 3 consecutive integers that are in A376616.

Original entry on oeis.org

38143807, 67141710, 67511743, 67736383, 269912383, 675612223, 1251282942, 2216832254, 4135244542, 4213075438, 4256878846, 4608511334, 5089851270, 5148094783, 5383281343, 5457887279, 5905845439, 7247769919, 7355297535, 7811735295, 8209151742, 8503999231, 8591105023, 9015656767
Offset: 1

Views

Author

Amiram Eldar, Oct 04 2024

Keywords

Examples

			38143807 is a term since 38143807, 38143808 and 38143809 are all in A376616: 38143807/A000120(38143807) = 2934139, and 2934139/A000120(2934139) = 225703 are integers, 38143808/A000120(38143808) = 4767976, and 4767976/A000120(4767976) = 595997 are integers, and 38143809/A000120(38143809) = 4238201, and 4238201/A000120(4238201) = 385291 are integers.
		

Crossrefs

Subsequence of A330932, A376616 and A376793.
Cf. A000120.

Programs

  • Mathematica
    q[k_] := q[k] = Module[{w = DigitCount[k, 2, 1]}, Divisible[k, w] && Divisible[k/w, DigitCount[k/w, 2, 1]]]; Select[Range[10^8], q[#] && q[#+1] && q[#+2] &]
  • PARI
    is1(k) = {my(w = hammingweight(k)); !(k % w) && !((k/w) % hammingweight(k/w));}
    lista(kmax) = {my(q1 = is1(1), q2 = is1(2), q3); for(k = 3, kmax, q3 = is1(k); if(q1 && q2 && q3, print1(k-2, ", ")); q1 = q2; q2 = q3);}

A376617 Binary Niven numbers (A049445) k such that m = k/wt(k) and m/wt(m) are also binary Niven numbers, where wt(k) = A000120(k) is the binary weight of k.

Original entry on oeis.org

1, 2, 4, 8, 16, 24, 32, 40, 48, 64, 72, 80, 96, 128, 136, 144, 160, 192, 256, 264, 272, 288, 320, 384, 512, 520, 528, 544, 576, 640, 756, 768, 960, 1024, 1032, 1040, 1056, 1088, 1104, 1152, 1280, 1296, 1380, 1472, 1512, 1536, 1620, 1656, 1728, 1840, 1856, 1920, 1944
Offset: 1

Views

Author

Amiram Eldar, Sep 30 2024

Keywords

Comments

Numbers k such that A376615(k) = 0 or A376615(k) >= 4.

Examples

			24 is a term since 24/wt(24) = 12 is an integer, 12/wt(12) = 6 is an integer, and 6/wt(6) = 3 is an integer.
		

Crossrefs

Subsequence of A049445 and A376616.
A000079 is a subsequence.

Programs

  • Mathematica
    q[k_] := Module[{w = DigitCount[k, 2, 1], w2, m, n}, IntegerQ[m = k/w] && Divisible[m, w2 = DigitCount[m, 2, 1]] && Divisible[n = m/w2, DigitCount[n, 2, 1]]]; Select[Range[2000], q]
  • PARI
    s(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + s(n/w)));}
    is(k) = {my(sk = s(k)); sk == 0 || sk >= 4;}

A376615 a(n) is the number of iterations that n requires to reach a noninteger under the map x -> x / wt(x), where wt(k) is the binary weight of k (A000120); a(n) = 0 if n is a power of 2.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Sep 30 2024

Keywords

Comments

The powers of 2 are fixed points of the map, since wt(2^k) = 1 for all k >= 0. Therefore they are arbitrarily assigned the value a(2^k) = 0.
Each number n starts a chain of a(n) integers: n, n/wt(n), (n/wt(n))/wt(n/wt(n)), ..., of them the first a(n)-1 integers are binary Niven numbers (A049445).

Examples

			a(6) = 2 since 6/wt(6) = 3 and 3/wt(3) = 3/2 is a noninteger that is reached after 2 iterations.
a(20) = 3 since 20/wt(20) = 10, 10/wt(10) = 5 and 5/wt(5) = 5/2 is a noninteger that is reached after 3 iterations.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Module[{bw = DigitCount[n, 2, 1]}, If[bw == 1, 0, If[!Divisible[n, bw], 1, 1 + a[n/bw]]]]; Array[a, 100]
  • PARI
    a(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + a(n/w)));}

Formula

a(n) = 0 if and only if n is in A000079 (by definition).
a(n) = 1 if and only if n is in A065878.
a(n) >= 2 if and only if n is in A049445 \ A000079 (i.e., n is a binary Niven number that is not a power of 2).
a(n) >= 3 if and only if n is in A376616 \ A000079.
a(n) >= 4 if and only if n is in A376617 \ A000079.
a(2*n) >= a(n).
a(3*2^n) = n+1 for n >= 0.
a(n) < A000005(n).

A377209 Zeckendorf-Niven numbers (A328208) k such that k/z(k) is also a Zeckendorf-Niven number, where z(k) = A007895(k) is the number of terms in the Zeckendorf representation of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 12, 13, 16, 21, 24, 26, 30, 34, 36, 42, 48, 55, 60, 66, 68, 72, 78, 81, 89, 90, 108, 110, 120, 126, 135, 144, 152, 168, 178, 180, 192, 204, 207, 233, 240, 243, 264, 270, 276, 288, 300, 304, 312, 324, 330, 336, 360, 377, 380, 390, 396, 408
Offset: 1

Views

Author

Amiram Eldar, Oct 20 2024

Keywords

Examples

			12 is a term since 12/z(12) = 4 is an integer and also 4/z(4) = 2 is an integer.
		

Crossrefs

Cf. A007895, A376616 (binary analog).
Subsequence of A328208.
Subsequences: A000045, A377210.

Programs

  • Mathematica
    zeck[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; (* Alonso del Arte at A007895 *)
    q[k_] := Module[{z = zeck[k]}, Divisible[k, z] && Divisible[k/z, zeck[k/z]]]; Select[Range[400], q]
  • PARI
    zeck(n) = if(n<4, n>0, my(k=2, s, t); while(fibonacci(k++)<=n, ); while(k && n, t=fibonacci(k); if(t<=n, n-=t; s++); k--); s) \\ Charles R Greathouse IV at A007895
    is(k) = {my(z = zeck(k)); !(k % z) && !((k/z) % zeck(k/z)); }

A377385 Factorial-base Niven numbers (A118363) k such that k/f(k) is also a factorial-base Niven number, where f(k) = A034968(k) is the sum of digits in the factorial-base representation of k.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 24, 27, 36, 40, 48, 54, 72, 80, 96, 108, 120, 135, 144, 168, 175, 180, 192, 208, 210, 240, 280, 288, 336, 360, 384, 420, 432, 468, 480, 490, 572, 576, 594, 600, 630, 720, 732, 740, 750, 780, 784, 819, 840, 846, 861, 864, 888, 900, 924, 936, 945, 980, 984
Offset: 1

Views

Author

Amiram Eldar, Oct 27 2024

Keywords

Examples

			8 is a term since 8/f(8) = 4 is an integer and also 4/f(4) = 2 is an integer.
		

Crossrefs

Subsequence of A118363.
Subsequences: A000142, A377386.
Analogous sequences: A376616 (binary), A377209 (Zeckendorf).

Programs

  • Mathematica
    fdigsum[n_] := Module[{k = n, m = 2, r, s = 0}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, s += r; m++]; s]; q[k_] := Module[{f = fdigsum[k]}, Divisible[k, f] && Divisible[k/f, fdigsum[k/f]]]; Select[Range[1000], q]
  • PARI
    fdigsum(n) = {my(k = n, m = 2, r, s = 0); while([k, r] = divrem(k, m); k != 0 || r != 0, s += r; m++); s;}
    is(k) = {my(f = fdigsum(k)); !(k % f) && !((k/f) % fdigsum(k/f));}

A376619 a(n) is the least odd number k such that A376615(k) = n, or -1 if no such number exists.

Original entry on oeis.org

3, 21, 345, 10625, 74375, 860625, 84189105, 1599592995, 23993894925
Offset: 1

Views

Author

Amiram Eldar, Sep 30 2024

Keywords

Comments

Without the restriction to odd numbers the corresponding sequence is 3*2^(n-1) = A007283(n-1).
All the terms above 3 are odd binary Niven numbers (A144302).
a(10) > 10^13, if it exists.

Examples

			  n | The n iterations
  --+------------------------------------------------------
  1 | 3 -> 3/2
  2 | 21 -> 7 -> 7/3
  3 | 345 -> 69 -> 23 -> 23/4
  4 | 10625 -> 2125 -> 425 -> 85 -> 85/4
  5 | 74375 -> 10625 -> 2125 -> 425 -> 85 -> 85/4
  6 | 860625 -> 95625 -> 10625 -> 2125 -> 425 -> 85 -> 85/4
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = Module[{bw = DigitCount[n, 2, 1]}, If[bw == 1, 0, If[!Divisible[n, bw], 1, 1 + s[n/bw]]]]; seq[len_] := Module[{v = Table[0, {len}], c = 0, k = 3, i}, While[c < len, i = s[k]; If[v[[i]] == 0, c++; v[[i]] = k]; k += 2]; v]; seq[5]
  • PARI
    s(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + s(n/w)));}
    lista(len) = {my(v = vector(len), c = 0, k = 3, i); while(c < len, i = s(k); if(v[i] == 0, c++; v[i] = k); k += 2); v;}

A376618 Odd binary Niven numbers (A144302) k such that k/wt(k) is also an odd binary Niven number, where wt(k) = A000120(k) is the binary weight of k.

Original entry on oeis.org

1, 345, 405, 775, 1305, 1425, 1435, 1605, 2125, 2325, 2485, 2765, 2825, 4235, 4305, 4459, 4655, 4725, 5085, 5145, 5607, 5625, 5929, 6223, 6405, 7515, 7623, 8145, 10625, 11151, 11835, 12325, 12355, 12425, 13527, 13825, 13995, 14805, 16695, 18445, 20505, 20625, 20925
Offset: 1

Views

Author

Amiram Eldar, Sep 30 2024

Keywords

Comments

If m is a term then 2^k * m is a term of A376616 for all k >= 0.

Examples

			345 is a term since it is odd, 345/wt(345) = 69 is an integer, and 69/wt(69) = 23 is an integer.
		

Crossrefs

Intersection of A005408 and A376616.
Subsequence of A049445 and A144302.
Cf. A000120.

Programs

  • Mathematica
    q[k_] := Module[{w = DigitCount[k, 2, 1]}, Divisible[k, w] && Divisible[k/w, DigitCount[k/w, 2, 1]]]; Select[Range[1, 21000, 2], q]
  • PARI
    is(k) = if(!(k % 2), 0, my(w = hammingweight(k)); !(k % w) && !((k/w) % hammingweight(k/w)));
Showing 1-8 of 8 results.