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.

Previous Showing 21-30 of 317 results. Next

A330927 Numbers k such that both k and k + 1 are Niven numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 80, 110, 111, 132, 152, 200, 209, 224, 399, 407, 440, 480, 510, 511, 512, 629, 644, 735, 800, 803, 935, 999, 1010, 1011, 1014, 1015, 1016, 1100, 1140, 1160, 1232, 1274, 1304, 1386, 1416, 1455, 1520, 1547, 1651, 1679, 1728, 1853
Offset: 1

Views

Author

Amiram Eldar, Jan 03 2020

Keywords

Comments

Cooper and Kennedy proved that there are infinitely many runs of 20 consecutive Niven numbers. Therefore this sequence is infinite.

Examples

			1 is a term since 1 and 1 + 1 = 2 are both Niven numbers.
		

References

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

Crossrefs

Programs

  • Magma
    f:=func; a:=[]; for k in [1..2000] 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
    nivenQ[n_] := Divisible[n, Total @ IntegerDigits[n]]; nq1 = nivenQ[1]; seq = {}; Do[nq2 = nivenQ[k]; If[nq1 && nq2, AppendTo[seq, k - 1]]; nq1 = nq2, {k, 2, 2000}]; seq
    SequencePosition[Table[If[Divisible[n,Total[IntegerDigits[n]]],1,0],{n,2000}],{1,1}][[;;,1]] (* Harvey P. Dale, Dec 24 2023 *)
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        h1, h2 = 1, 2
        while True:
            if h2 - h1 == 1: yield h1
            h1, h2 = h2, next(k for k in count(h2+1) if k%sum(map(int, str(k))) == 0)
    print(list(islice(agen(), 52))) # Michael S. Branicky, Mar 17 2024

A328212 Lazy-Fibonacci-Niven numbers: numbers divisible by the number of terms in their lazy Fibonacci representation (A112310).

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 15, 16, 28, 30, 35, 36, 48, 55, 60, 70, 72, 75, 78, 84, 90, 102, 105, 114, 119, 126, 133, 144, 147, 154, 156, 161, 168, 180, 182, 184, 192, 198, 203, 208, 216, 224, 238, 240, 245, 252, 259, 264, 266, 272, 280, 296, 301, 304, 308, 315, 320, 322
Offset: 1

Views

Author

Amiram Eldar, Oct 07 2019

Keywords

Examples

			6 is in the sequence since A112310(6) = 3 and 3 is a divisor of 6.
		

Crossrefs

Programs

  • Mathematica
    ooQ[n_] := Module[{k = n}, While[k > 3, If[Divisible[k, 4], Return[True], k = Quotient[k, 2]]]; False]; c = 0; s = {}; Do[If[! ooQ[k], c++; d = Total @ IntegerDigits[k, 2]; If[Divisible[c, d], AppendTo[s, c]]], {k, 1, 2000}]; s

A328209 Numbers m such that m and m+1 are consecutive Zeckendorf-Niven numbers (A328208).

Original entry on oeis.org

1, 2, 3, 4, 5, 12, 13, 21, 26, 55, 68, 80, 89, 92, 93, 110, 152, 183, 195, 207, 233, 236, 237, 254, 291, 304, 327, 364, 377, 380, 381, 398, 435, 471, 484, 555, 584, 605, 609, 639, 644, 759, 795, 834, 875, 894, 930, 987, 992, 1004, 1011, 1028, 1047, 1076, 1220
Offset: 1

Views

Author

Amiram Eldar, Oct 07 2019

Keywords

Examples

			12 is in the sequence since both 12 and 13 are in A328208: A007895(12) = 3 is a divisor of 12, and A007895(13) = 1 is a divisor of 13.
		

Crossrefs

Programs

  • Mathematica
    z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; aQ[n_] := Divisible[n, z[n]]; c = 0; k = 1; s = {}; v = Table[-1, {2}]; While[c < 60, If[aQ[k], v = Join[Rest[v], {k}]; If[AllTrue[Differences[v], # == 1 &], c++; AppendTo[s, k - 1]]]; k++]; s (* after Alonso del Arte at A007895 *)

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

A333426 Primorial base Niven numbers: numbers divisible by their sum of digits in primorial base (A276150).

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 12, 16, 18, 20, 24, 25, 30, 32, 33, 36, 40, 42, 44, 45, 48, 50, 60, 64, 65, 66, 68, 70, 72, 77, 84, 88, 90, 92, 96, 105, 108, 112, 117, 120, 132, 133, 136, 144, 150, 154, 156, 160, 168, 180, 182, 184, 189, 192, 198, 200, 210, 212, 213, 216, 220
Offset: 1

Views

Author

Amiram Eldar, Mar 20 2020

Keywords

Comments

Numbers k for which A276086(k) is in A373852. - Antti Karttunen, Jun 22 2024

Examples

			1 is a term since A276150(1) = 1 divides 1;
2 is a term since A276150(2) = 1 divides 2;
		

Crossrefs

Programs

  • Mathematica
    max = 5; bases = Prime @ Range[max, 1, -1]; nmax = Times @@ bases - 1; sumdig[n_] := Plus @@ IntegerDigits[n, MixedRadix[bases]]; Select[Range[nmax], Divisible[#, sumdig[#]] &]
  • PARI
    isA333426 = A373834; \\ Antti Karttunen, Jun 22 2024

A057147 a(n) = n times sum of digits of n.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 10, 22, 36, 52, 70, 90, 112, 136, 162, 190, 40, 63, 88, 115, 144, 175, 208, 243, 280, 319, 90, 124, 160, 198, 238, 280, 324, 370, 418, 468, 160, 205, 252, 301, 352, 405, 460, 517, 576, 637, 250, 306, 364, 424, 486, 550, 616
Offset: 0

Views

Author

N. J. A. Sloane, Sep 13 2000

Keywords

Comments

A056992(n) = A010888(a(n)). - Reinhard Zumkeller, Mar 19 2014

Crossrefs

Iterations: A047892 (start=2), A047912 (start=3), A047897 (start=5), A047898 (start=6), A047899 (start=7), A047900 (start=8), A047901 (start=9), A047902 (start=11).

Programs

  • Haskell
    a057147 n = a007953 n * n  -- Reinhard Zumkeller, Mar 19 2014
    
  • Maple
    for n from 0 to 150 do printf(`%d,`,n*add(convert(n, base, 10)[i], i=1..nops(convert(n,base, 10)))) od:
  • Mathematica
    Table[n*Total[IntegerDigits[n]], {n, 0, 100}]
  • PARI
    a(n) = n*sumdigits(n) \\ Franklin T. Adams-Watters, Aug 03 2014
    
  • Python
    [n*sum([int(d) for d in str(n)]) for n in range(10**5)] # Chai Wah Wu, Aug 05 2014

Formula

a(n) = n*A007953(n). - Michel Marcus, Aug 10 2014
G.f.: x * (d/dx) (1/(1 - x))*Sum_{k>=1} (x^k - x^(10^k+k) - 9*x^(10^k))/(1 - x^(10^k)). - Ilya Gutkovskiy, Mar 27 2018

Extensions

More terms from James Sellers and Larry Reeves (larryr(AT)acm.org), Sep 13 2000

A328210 Starts of runs of 3 consecutive Zeckendorf-Niven numbers (A328208).

Original entry on oeis.org

1, 2, 3, 4, 12, 92, 236, 380, 1850, 2630, 4184, 7010, 8183, 8360, 11944, 12754, 13550, 16024, 17710, 17714, 18710, 20628, 22323, 22624, 25564, 28910, 31506, 36463, 36484, 39746, 40368, 44694, 48244, 49294, 53543, 58910, 59164, 64743, 70398, 75024, 77874, 78184
Offset: 1

Views

Author

Amiram Eldar, Oct 07 2019

Keywords

Examples

			12 is in the sequence since 12, 13 and 14 are in A328208: A007895(12) = 3 is a divisor of 12, A007895(13) = 1 is a divisor of 13, and A007895(14) = 2 is a divisor of 14.
		

Crossrefs

Programs

  • Mathematica
    z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; aQ[n_] := Divisible[n, z[n]]; c = 0; k = 1; s = {}; v = Table[-1, {3}]; While[c < 50, If[aQ[k], v = Join[Rest[v], {k}]; If[AllTrue[Differences[v], # == 1 &], c++; AppendTo[s, k - 2]]]; k++]; s (* after Alonso del Arte at A007895 *)

A209871 Quasi-Niven (or Quasi-Harshad) numbers: numbers that divided by the sum of their digits leave 1 as remainder.

Original entry on oeis.org

11, 13, 17, 41, 43, 56, 91, 97, 101, 106, 121, 131, 155, 157, 161, 181, 188, 221, 232, 233, 239, 254, 271, 274, 301, 305, 311, 353, 361, 365, 385, 391, 401, 421, 451, 452, 491, 494, 508, 521, 529, 541, 551, 599, 610, 617, 625, 631, 647, 650, 673, 685, 721
Offset: 1

Views

Author

Paolo P. Lava, Mar 29 2012

Keywords

Comments

Numbers n for which [n mod s(n)]=1, where s(n) is the sum of the digits of n.
z-Niven numbers with A=1 and B=-1 (see comment in A005349).
First pair of consecutive numbers is {232,233}.

Examples

			s(43)=7 and 6*7+1=43.
		

Crossrefs

Cf. A005349.

Programs

  • Magma
    [n: n in [1..721] | n mod s eq 1 where s is &+Intseq(n)]; // Bruno Berselli, Mar 29 2012
  • Maple
    with(numtheory);
    A209871:=proc(i)
    local a,b,n;
    for n from 1 to i do
      a:=n; b:=0;
      while a>0 do b:=b+(a mod 10); a:=trunc(a/10); od;
      a:=n mod b; if a=1 then print(n); fi;
    od; end:
    A209871(10000);

A331728 Negabinary-Niven numbers: numbers divisible by the sum of digits in their negabinary representation (A027615).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 12, 14, 15, 16, 18, 20, 21, 24, 28, 30, 32, 33, 35, 36, 40, 42, 48, 50, 52, 54, 56, 57, 60, 62, 63, 64, 66, 68, 69, 72, 76, 78, 80, 81, 84, 88, 90, 91, 95, 96, 100, 102, 108, 110, 112, 114, 120, 124, 125, 126, 128, 129, 132, 136, 138, 140
Offset: 1

Views

Author

Amiram Eldar, Jan 27 2020

Keywords

Examples

			6 is a term since A039724(6) = 11010 and 1 + 1 + 0 + 1 + 0 = 3 is a divisor of 6.
		

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]]; Select[Range[100], negaBinNivenQ]

A064150 Numbers divisible by the sum of their ternary digits.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 33, 35, 36, 39, 40, 45, 48, 54, 56, 57, 60, 63, 64, 65, 72, 75, 77, 78, 80, 81, 82, 84, 87, 88, 90, 92, 93, 95, 96, 99, 100, 105, 108, 111, 112, 115, 117, 120, 132, 133, 135, 136, 144, 145, 150, 152
Offset: 1

Views

Author

Len Smiley, Sep 11 2001

Keywords

Comments

a(n) mod A053735(a(n)) = 0. - Reinhard Zumkeller, Nov 25 2009

Crossrefs

Cf. A005349 (Decimal), A049445 (Binary).

Programs

  • Haskell
    a064150 n = a064150_list !! (n-1)
    a064150_list = filter (\x -> x `mod` a053735 x == 0) [1..]
    -- Reinhard Zumkeller, Oct 28 2012
    
  • Mathematica
    Select[Range[200], IntegerQ[#/(Plus@@IntegerDigits[#, 3])] &] (* Alonso del Arte, May 27 2011 *)
  • PARI
    isok(m)={m % sumdigits(m, 3) == 0} \\ Harry J. Smith, Sep 09 2009
    
  • Python
    import numpy as np
    def gen():
        for dec_num in range(1,153):
            tern_num = np.base_repr(dec_num, 3)
            sum_tern_digits = 0
            for i in tern_num:
                sum_tern_digits += int(i)
            if dec_num % sum_tern_digits == 0:
                yield dec_num
    print(list((gen()))) # Adrienne Leonardo, Dec 28 2024

Extensions

Corrected and extended by Vladeta Jovovic, Sep 22 2001
Offset corrected by Reinhard Zumkeller, Oct 28 2012
Previous Showing 21-30 of 317 results. Next