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

A333702 Numbers k such that k divides the sum of digits in factorial base of all numbers from 1 to k.

Original entry on oeis.org

1, 2, 10, 22, 25, 29, 33, 70, 118, 358, 598, 1438, 1803, 1819, 2878, 2881, 2997, 4318, 4322, 4388, 10078, 20158, 21967, 21971, 21975, 30238, 30241, 30837, 40318, 120958, 141121, 142557, 201598, 214563, 214675, 282238, 362878, 649446, 649504, 1088638, 1303204, 1303314
Offset: 1

Views

Author

Amiram Eldar, Apr 02 2020

Keywords

Comments

The corresponding quotients are 1, 1, 2, 3, 3, 3, 3, 4, 5, ...

Examples

			10 is a term since the sum of digits in factorial base (A034968) of k from 1 to 10 is 1 + 1 + 2 + 2 + 3 + 1 + 2 + 2 + 3 + 3 = 20, which is divisible by 10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Module[{s=0, i=2, k=n}, While[k > 0, k = Floor[n/i!]; s = s + (i-1)*k; i++]; n-s]; seq = {}; s = 0; Do[s += f[n]; If[Divisible[s, n], AppendTo[seq, n]], {n, 1, 10^5}]; seq (* after Jean-François Alcover at A034968 *)

A333703 Numbers k such that k divides the sum of digits in primorial base of all numbers from 1 to k.

Original entry on oeis.org

1, 2, 10, 22, 58, 62, 63, 64, 66, 67, 68, 118, 178, 418, 838, 1258, 1264, 1265, 1277, 1278, 1678, 2098, 4618, 9238, 10508, 10509, 10510, 10512, 10513, 10514, 13858, 14704, 14754, 18478, 23098, 23102, 23276, 27718, 60058, 120118, 138602, 139016, 139024, 139134
Offset: 1

Views

Author

Amiram Eldar, Apr 02 2020

Keywords

Comments

The corresponding quotients are 1, 1, 2, 3, 4, 4, 4, 4, 4, ....

Examples

			10 is a term since the sum of digits in primorial base (A276150) of k from 1 to 10 is 1 + 1 + 2 + 2 + 3 + 1 + 2 + 2 + 3 + 3 = 20, which is divisible by 10.
		

Crossrefs

Programs

  • Mathematica
    max = 10; bases = Prime@Range[max, 1, -1]; nmax = Times @@ bases - 1; s[n_] := Plus @@ IntegerDigits[n, MixedRadix[bases]]; seq = {}; sum = 0; Do[sum += s[n]; If[Divisible[sum, n], AppendTo[seq, n]], {n, 1, 10^6}]; seq

A333704 Numbers k such that the total number of 1's in the Zeckendorf representation of the first k integers is a multiple of k.

Original entry on oeis.org

1, 2, 3, 28, 29, 1119, 6133, 6134, 1141774, 6851892, 6854270, 6854271, 6880561, 219181118, 1113539751, 1187863323, 1200376103, 1247070050, 1247070068, 1247070100, 1247070104, 1247070130, 1251287495, 1252760510, 1257001167, 40920315565, 41404469929, 41473080530
Offset: 1

Views

Author

Amiram Eldar, Apr 02 2020

Keywords

Comments

The corresponding quotients are 1, 1, 1, 2, 2, 4, 5, 5, 8, ...

Examples

			3 is a term since the numbers 1, 2 and 3 in the Zeckendorf representation are 1, 10 and 100, and the sum of their numbers of digits of 1 is 1 + 1 + 1 = 3 which is divisible by 3.
		

Crossrefs

Programs

  • Mathematica
    zeckSum[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; seq = {}; sum = 0; Do[sum += zeckSum[n]; If[Divisible[sum, n], AppendTo[seq, n]], {n, 1, 10^6}]; seq

Extensions

More terms from Amiram Eldar, Oct 12 2023

A333705 Numbers k such that the total number of 1's in the dual Zeckendorf representation of the first k integers is a multiple of k.

Original entry on oeis.org

1, 2, 8, 21, 100, 204, 401, 3062, 5974, 11402, 22597, 22598, 43553, 85519, 166243, 1218380, 8854646, 248592083, 248592084, 485966511
Offset: 1

Views

Author

Amiram Eldar, Apr 02 2020

Keywords

Comments

The corresponding quotients are 1, 1, 2, 3, 5, 6, 7, 10, 11, ...
No more terms below 3*10^9.

Examples

			8 is a term since the numbers 1, 2, ... 8 in the dual Zeckendorf representation are 1, 10, 11, 101, 110, 111, 1010, 1011, and the sum of their numbers of digits of 1 is 1 + 1 + 2 + 2 + 2 + 3 + 2 + 3 = 16 which is divisible by 8.
		

Crossrefs

Programs

  • Mathematica
    fibTerms[n_] := Module[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; fr];
    dualZeckSum[n_] := Module[{v = fibTerms[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] == 1 && v[[i + 1]] == 0 && v[[i + 2]] == 0, v[[i]] = 0; v[[i + 1]] = 1; v[[i + 2]] = 1; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, Total[v[[i[[1, 1]] ;; -1]]]]];
    seq = {}; sum = 0; Do[sum += dualZeckSum[n]; If[Divisible[sum, n], AppendTo[seq, n]], {n, 1, 10^6}]; seq

A316312 Numbers k such that the sum of the digits of the numbers 1, 2, 3, ... up to (k - 1) is divisible by k.

Original entry on oeis.org

1, 3, 5, 7, 9, 12, 15, 20, 27, 40, 45, 60, 63, 80, 81, 100, 180, 181, 300, 360, 363, 500, 540, 545, 700, 720, 727, 900, 909, 912, 915, 1137, 1140, 1200, 1500, 1560, 1563, 2000, 2700, 2720, 2727, 4000, 4500, 4540, 4545, 6000, 6300, 6360, 6363, 8000, 8100, 8180
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that A007953(A007908(k - 1)) is divisible by k. - Felix Fröhlich, Jun 29 2018
From Robert Israel, Jun 29 2018: (Start)
Numbers k such that A037123(k - 1) is divisible by k.
If m is even, then 10^m, 3 * 10^m, 5 * 10^m, 7 * 10^m and 9 * 10^m are included.
If m is odd, then 2 * 10^m, 4 * 10^m, 6 * 10^m, and 8 * 10^m are included. (End)
Is it true that if k is a term then 100 * k is a term?

Examples

			For n = 7, sum of the digits of the numbers 1 to 6 is 21, which is divisible by 7.
For n = 12, sum of the digits of the numbers 1 to 11 is 48, which is divisible by 12.
For n = 15, sum of the digits of the numbers 1 to 14 is 60, which is divisible by 15.
16 is not in the sequence because the sum of the digits of the numbers 1 to 15 is 66, which is not divisible by 16.
		

Crossrefs

Programs

  • Maple
    t:= 0: Res:= NULL:
    for n from 1 to 10000 do
      t:= t + convert(convert(n-1,base,10),`+`);
      if (t/n)::integer then Res:= Res, n fi
    od:
    Res; # Robert Israel, Jun 29 2018
  • Mathematica
    s = 0; Reap[Do[If[Mod[s, n] == 0, Sow[n]]; s += Plus @@ IntegerDigits@n, {n, 10000}]][[2, 1]] (* Giovanni Resta, Jun 29 2018 *)
  • PARI
    sumsod(n) = sum(i=1, n, sumdigits(i))
    is(n) = sumsod(n-1)%n==0 \\ Felix Fröhlich, Jun 29 2018
    
  • PARI
    upto(n) = my(s=0,res=List()); for(i=0, n, s += vecsum(digits(i)); if(s%(i+1)==0, listput(res, i+1))); res \\ David A. Corneth, Jun 29 2018

Extensions

More terms from Felix Fröhlich, Jun 29 2018

A316492 Numbers k such that the average digit in the concatenation of the numbers from 1 through k is an integer.

Original entry on oeis.org

1, 3, 5, 7, 9, 122, 576, 1422, 1876, 4122, 4576
Offset: 1

Views

Author

Jon E. Schoenfield, Aug 11 2018

Keywords

Comments

Equivalently, numbers k such that A058183(k) divides A037123(k).
4576 is the final term; 4 < A037123(k)/A058183(k) < 5 for all k > 4576.

Examples

			9 is a term because the average digit in 123456789 is (1+2+3+4+5+6+7+8+9)/9 = 45/9 = 5 (an integer).
122 is a term because 12345789101112..119120121122 has digit sum 1032 and digit count 258, and 1032/258 = 4 (an integer).
		

Crossrefs

Programs

  • Mathematica
    Flatten@ Position[ Divide @@@ Transpose[ Accumulate /@ {Total /@ #, Length /@ #} &@ IntegerDigits@ Range@ 5000], Integer] (* _Giovanni Resta, Aug 12 2018 *)

A319733 a(n) is the sum of the digits of all positive integers k <= 2^n.

Original entry on oeis.org

1, 3, 10, 36, 73, 177, 460, 1083, 2395, 5616, 13645, 28410, 61237, 139332, 288640, 617238, 1349299, 2868414, 5996665, 12814005, 28009981, 57356550, 119204515, 256361433, 523470583, 1084937169, 2295828010, 4741694379, 9785380105, 20385048345, 43120114795, 87517507827, 180053228620, 379360852038, 769412529055
Offset: 0

Views

Author

Joseph K. Horn and Robert G. Wilson v, Sep 26 2018

Keywords

Comments

Inspired by A114136.

Examples

			a(0) = 1;
a(1) = 3 = 1+2;
a(2) = 10 = 1+2+3+4;
a(3) = 36 = 1+2+3+4+5+6+7+8;
a(4) = 73 = 1+2+3+4+5+6+7+8+9+(1+0)+(1+1)+(1+2)+(1+3)+(1+4)+(1+5)+(1+6);
a(5) = 177 = 1+2+3+4+5+6+7+8+9+(1+0)+(1+1)+(1+2)+(1+3)+(1+4)+(1+5)+(1+6)+(1+7)+(1+8)+(1+9)+(2+0)+(2+1)+(2+2)+(2+3)+(2+4)+(2+5)+(2+6)+(2+7)+(2+8)+(2+9)+(3+0)+(3+1)+(3+2); etc.
		

Crossrefs

Programs

  • Mathematica
    k = s = 0; lst = {}; Do[ While[k <= 2^n, s = s + Plus @@ IntegerDigits@ k; k++]; AppendTo[lst, s], {n, 0, 32}] (* slow, or *)
    f[n_, d_ /; d > 0, b_: 10] := Sum[k = n + 1; j = Mod[Floor[k/b^i], b]; j*i*b^(i - 1) + Mod[k, b^i]*Boole[j == d] + b^i*Boole[j > d > 0], {i, 0, Log[b, k]}]; (* calculates the number of times the digit, 0
    				
  • PARI
    a(n) = sum(k=0, 2^n, sumdigits(k)); \\ Michel Marcus, Sep 27 2018
Showing 1-7 of 7 results.