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-10 of 19 results. Next

A330931 Numbers k such that both k and k + 1 are Niven numbers in base 2 (A049445).

Original entry on oeis.org

1, 20, 68, 80, 115, 155, 184, 204, 260, 272, 284, 320, 344, 355, 395, 404, 424, 464, 555, 564, 595, 623, 624, 636, 664, 675, 804, 835, 846, 847, 864, 875, 888, 904, 972, 1028, 1040, 1075, 1088, 1124, 1164, 1182, 1211, 1224, 1239, 1266, 1280, 1304, 1315, 1424
Offset: 1

Views

Author

Amiram Eldar, Jan 03 2020

Keywords

Comments

Cai proved that there are infinitely many runs of 4 consecutive Niven numbers in base 2. Therefore this sequence is infinite.

Examples

			20 is a term since 20 and 20 + 1 = 21 are both Niven numbers in base 2.
		

References

  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 382.

Crossrefs

Programs

  • Magma
    f:=func; a:=[]; for k in [1..1500] do  if forall{m:m in [0..1]|f(k+m)} then Append(~a,k); end if; end for; a; // Marius A. Burtea, Jan 03 2020
    
  • Mathematica
    binNivenQ[n_] := Divisible[n, Total @ IntegerDigits[n, 2]]; bnq1 = binNivenQ[1]; seq = {}; Do[bnq2 = binNivenQ[k]; If[bnq1 && bnq2, AppendTo[seq, k - 1]]; bnq1 = bnq2, {k, 2, 10^4}]; seq
  • Python
    def sbd(n): return sum(map(int, str(bin(n)[2:])))
    def niv2(n): return n%sbd(n) == 0
    def aupto(nn): return [k for k in range(1, nn+1) if niv2(k) and niv2(k+1)]
    print(aupto(1424)) # Michael S. Branicky, Jan 20 2021

A330932 Starts of runs of 3 consecutive Niven numbers in base 2 (A049445).

Original entry on oeis.org

623, 846, 2358, 4206, 4878, 6127, 6222, 6223, 12438, 16974, 21006, 27070, 31295, 33102, 33103, 35343, 37134, 37630, 37638, 40703, 43263, 45550, 48190, 49230, 52590, 53262, 53263, 56110, 59630, 66198, 66702, 66703, 67878, 69310, 69487, 72655, 74766, 77230, 77958
Offset: 1

Views

Author

Amiram Eldar, Jan 03 2020

Keywords

Comments

Cai proved that there are infinitely many runs of 4 consecutive Niven numbers in base 2. Therefore this sequence is infinite.

Examples

			623 is a term since 623, 624 and 625 are all Niven numbers in base 2.
		

References

  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 382.

Crossrefs

Programs

  • Magma
    f:=func; a:=[]; for k in [1..80000] do  if forall{m:m in [0..2]|f(k+m)} then Append(~a,k); end if; end for; a; // Marius A. Burtea, Jan 03 2020
  • Mathematica
    binNivenQ[n_] := Divisible[n, Total @ IntegerDigits[n, 2]]; bin = binNivenQ /@ Range[3]; seq = {}; Do[bin = Join[Rest[bin], {binNivenQ[k]}]; If[And @@ bin, AppendTo[seq, k - 2]], {k, 3, 8*10^4}]; seq

A141769 Beginning of a run of 4 consecutive Niven (or Harshad) numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 510, 1014, 2022, 3030, 10307, 12102, 12255, 13110, 60398, 61215, 93040, 100302, 101310, 110175, 122415, 127533, 131052, 131053, 196447, 201102, 202110, 220335, 223167, 245725, 255045, 280824, 306015, 311232, 318800, 325600, 372112, 455422
Offset: 1

Views

Author

Sergio Pimentel, Sep 15 2008

Keywords

Comments

Cooper and Kennedy proved that there are infinitely many runs of 20 consecutive Niven numbers. Therefore this sequence is infinite. - Amiram Eldar, Jan 03 2020

Examples

			510 is in the sequence because 510, 511, 512 and 513 are all Niven numbers.
		

References

  • Jean-Marie De Koninck, Those Fascinating Numbers, American Mathematical Society, 2009, p. 36, entry 110.

Crossrefs

Cf. A005349, A330927, A154701, A330928, A330929, A330930, A060159 (start of run of 1, 2, ..., 7, exactly n consecutive Harshad numbers).
Cf. A330933, A328211, A328215 (analog for base 2, Zeckendorf- resp. Fibonacci-Niven variants).

Programs

  • Magma
    f:=func; a:=[]; for k in [1..500000] do  if forall{m:m in [0..3]|f(k+m)} then Append(~a,k); end if; end for; a; // Marius A. Burtea, Jan 03 2020
    
  • Mathematica
    nivenQ[n_] := Divisible[n, Total @ IntegerDigits[n]]; niv = nivenQ /@ Range[4]; seq = {}; Do[niv = Join[Rest[niv], {nivenQ[k]}]; If[And @@ niv, AppendTo[seq, k - 3]], {k, 4, 5*10^5}]; seq (* Amiram Eldar, Jan 03 2020 *)
  • PARI
    {A141769_first( N=50, L=4, a=List())= for(n=1,oo, n+=L; for(m=1,L, n--%sumdigits(n) && next(2)); listput(a,n); N--|| break);a} \\ M. F. Hasler, Jan 03 2022
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        h1, h2, h3, h4 = 1, 2, 3, 4
        while True:
            if h4 - h1 == 3: yield h1
            h1, h2, h3, h4, = h2, h3, h4, next(k for k in count(h4+1) if k%sum(map(int, str(k))) == 0)
    print(list(islice(agen(), 40))) # Michael S. Branicky, Mar 17 2024

Formula

This A141769 = { A005349(k) | A005349(k+3) = A005349(k)+3 }. - M. F. Hasler, Jan 03 2022

Extensions

More terms from Amiram Eldar, Jan 03 2020

A331824 Starts of runs of 4 consecutive positive negabinary-Niven numbers (A331728).

Original entry on oeis.org

1, 1264, 2104, 2944, 4624, 11888, 23768, 27312, 27728, 31688, 35648, 49144, 51488, 55448, 56704, 58384, 60072, 63424, 65104, 66784, 70144, 71288, 75248, 76452, 79208, 81904, 87128, 91088, 92832, 99008, 102968, 114848, 118808, 123904, 125592, 126728, 130624, 131044
Offset: 1

Views

Author

Amiram Eldar, Jan 27 2020

Keywords

Crossrefs

Programs

  • Mathematica
    negaBinWt[n_] := negaBinWt[n] = If[n == 0, 0, negaBinWt[Quotient[n - 1, -2]] + Mod[n, 2]]; negaBinNivenQ[n_] := Divisible[n, negaBinWt[n]]; nConsec = 4; neg = negaBinNivenQ /@ Range[nConsec]; seq = {}; c = 0; k = nConsec+1; While[c < 45, If[And @@ neg, c++; AppendTo[seq, k - nConsec]]; neg = Join[Rest[neg], {negaBinNivenQ[k]}]; k++]; seq

A342429 Starts of runs of 4 consecutive Niven numbers in base 3/2 (A342426).

Original entry on oeis.org

1649373, 4029519, 15281054, 31906263, 43387386, 58198173, 94468958, 100084949, 131393766, 131986502, 140282279, 156786124, 211004079, 246960048, 253000850, 278206663, 310135917, 330168203, 351204398, 363280904, 412296883, 504736647, 515831624, 537255647, 566300238
Offset: 1

Views

Author

Amiram Eldar, Mar 11 2021

Keywords

Comments

Are there 5 consecutive Niven numbers in base 3/2? There are no such numbers below 3*10^9.

Examples

			1649373 is a term since 1649373, 1649374, 1649375 and 1649376 are all Niven numbers in base 3/2.
		

Crossrefs

Subsequence of A342426, A342427 and A342428.
Similar sequences: A141769 (decimal), A328207 (factorial), A328211 (Zeckendorf), A328215 (lazy Fibonacci), A330933 (binary), A334311 (base phi), A331824 (negabinary).

Programs

  • Mathematica
    s[0] = 0; s[n_] := s[n] = s[2*Floor[n/3]] + Mod[n, 3]; q[n_] := Divisible[n, s[n]]; v = q /@ Range[4]; seq = {}; Do[v = Join[Rest[v], {q[k]}]; If[And @@ v, AppendTo[seq, k - 3]], {k, 4, 10^7}]; seq

A344344 Starts of runs of 4 consecutive Gray-code Niven numbers (A344341).

Original entry on oeis.org

1, 6, 30, 126, 510, 543, 783, 903, 2046, 2093, 3773, 3903, 7133, 7743, 8190, 8223, 8703, 10087, 12303, 12543, 14343, 14463, 15423, 15903, 16143, 16263, 20167, 22687, 27727, 30247, 30653, 30783, 32766, 35629, 40327, 47509, 47887, 49133, 50407, 57533, 60071, 60487
Offset: 1

Views

Author

Amiram Eldar, May 15 2021

Keywords

Comments

Are there 5 consecutive Gray-code Niven numbers? There are no such numbers below 10^10.

Examples

			1 is a term since 1, 2, 3 and 4 are all Gray-code Niven numbers.
		

Crossrefs

Subsequence of A344341, A344342 and A344343.
Similar sequences: A141769 (decimal), A328207 (factorial), A328211 (Zeckendorf), A328215 (lazy Fibonacci), A330933 (binary), A334311 (base phi), A331824 (negabinary), A342429 (base 3/2).

Programs

  • Mathematica
    gcNivenQ[n_] := Divisible[n, DigitCount[BitXor[n, Floor[n/2]], 2, 1]]; Select[Range[60000], AllTrue[# + {0, 1, 2, 3}, gcNivenQ] &]

A334311 Starts of runs of 4 consecutive base phi Niven numbers (A334308).

Original entry on oeis.org

285129, 1958893, 2501533, 6488440, 7069840, 8803023, 16514327, 23826399, 34031773, 52256248, 68198847, 72969138, 76779087, 77622950, 87430210, 87474672, 96485487, 114137958, 120197293, 136275022, 151444458, 173740578, 174878352, 183872325, 188385855, 196268415
Offset: 1

Views

Author

Amiram Eldar, Apr 22 2020

Keywords

Examples

			285129 is a term since 285129, 285130, 285131 and 285132 are all base phi Niven numbers.
		

Crossrefs

Programs

  • Mathematica
    phiDigSum[1] = 1; phiDigSum[n_] := Plus @@ RealDigits[n, GoldenRatio, 2*Ceiling[ Log[GoldenRatio, n] ]][[1]]; phiNivenQ[n_] := Divisible[n, phiDigSum[n]]; q1 = phiNivenQ[1]; q2 = phiNivenQ[2]; q3 = phiNivenQ[3]; seq = {}; Do[q4 = phiNivenQ[n]; If[q1 && q2 && q3 && q4, AppendTo[seq, n - 3]]; q1 = q2; q2 = q3; q3 = q4, {n, 4, 10^5}]; seq

A352092 Starts of runs of 4 consecutive tribonacci-Niven numbers (A352089).

Original entry on oeis.org

1602, 218349, 296469, 1213749, 1291869, 1896630, 1952070, 2153709, 2399550, 3149109, 3753870, 3809310, 3983229, 4226208, 4256790, 4449288, 4711482, 5707897, 5727708, 6141750, 6589230, 6969429, 7205757, 7229208, 7276143, 7292943, 7454710, 7752588, 7937109, 8877069
Offset: 1

Views

Author

Amiram Eldar, Mar 04 2022

Keywords

Comments

Conjecture: There are no runs of 5 consecutive tribonacci-Niven numbers (checked up to 10^10).

Examples

			1602 is a term since 1602, 1603, 1604 and 1605 are all divisible by the number of terms in their minimal tribonacci representation:
     k    A278038(k)  A278043(k)  k/A278043(k)
  --------------------------------------------
  1602  110100011010           6           267
  1603  110100011011           7           229
  1604  110100100000           4           401
  1605  110100100001           5           321
		

Crossrefs

Subsequence of A352089, A352090 and A352091.

Programs

  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; triboNivenQ[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; Divisible[n, DigitCount[Total[2^(s - 1)], 2, 1]]]; seq[count_, nConsec_] := Module[{tri = triboNivenQ /@ Range[nConsec], s = {}, c = 0, k = nConsec + 1}, While[c < count, If[And @@ tri, c++; AppendTo[s, k - nConsec]]; tri = Join[Rest[tri], {triboNivenQ[k]}]; k++]; s]; seq[6, 4]

A352110 Starts of runs of 4 consecutive lazy-tribonacci-Niven numbers (A352107).

Original entry on oeis.org

1081455, 1976895, 2894175, 5886255, 6906912, 15604110, 16588752, 19291479, 20387232, 25919439, 32394942, 34801557, 35654175, 36813582, 36907899, 39117219, 41407392, 43520832, 46181055, 47954499, 52145952, 54524319, 54815397, 56733639, 57775102, 58942959, 59292177
Offset: 1

Views

Author

Amiram Eldar, Mar 05 2022

Keywords

Comments

Conjecture: There are no runs of 5 consecutive lazy-tribonacci-Niven numbers (checked up to 6*10^9).

Examples

			1081455 is a term since 1081455, 1081456, 1081457 and 1081458 are all divisible by the number of terms in their maximal tribonacci representation:
        k               A352103(k)   A352104(k)    k/A352104(k)
  -------  -----------------------   ----------    ------------
  1081455  10101011011110110011110           15           72097
  1081456  10101011011110110011111           16           67591
  1081457  10101011011110110100100           13           83189
  1081458  10101011011110110100101           14           77247
		

Crossrefs

Subsequence of A352107, A352108 and A352109.

A352345 Starts of runs of 4 consecutive lazy-Pell-Niven numbers (A352342).

Original entry on oeis.org

750139, 41765247, 54831951, 56423275, 136038447, 151175724, 223956843, 227483124, 293913170, 362557214, 382572475, 457616575, 502106253, 562407324, 586380624, 637133390, 724382239, 771849439, 774421478, 859463253, 926398647, 953750523, 1043787390, 1193063550
Offset: 1

Views

Author

Amiram Eldar, Mar 12 2022

Keywords

Comments

Conjecture: There are no runs of 5 consecutive lazy-Pell-Niven numbers (checked up to 10^9).

Examples

			750139 is a term since 750139, 750140, 750141 and 750142 are all divisible by the sum of the digits in their maximal Pell representation:
       k        A352339(k)  A352340(k)  k/A352340(k)
  ------  ----------------  ---------   -----------
  750139  1102022021112220         19         39481
  750140  1102022021112221         20         37507
  750141  1102022021112222         21         35721
  750142  1102022021120210         17         44126
		

Crossrefs

Showing 1-10 of 19 results. Next