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 31-40 of 317 results. Next

A052018 Numbers k with the property that the sum of the digits of k is a substring of k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 109, 119, 129, 139, 149, 159, 169, 179, 189, 199, 200, 300, 400, 500, 600, 700, 800, 900, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 1000, 1009, 1018, 1027, 1036, 1045, 1054, 1063
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1999

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (isInfixOf)
    a052018 n = a052018_list !! (n-1)
    a052018_list = filter f [0..] where
       f x = show (a007953 x) `isInfixOf` show x
    -- Reinhard Zumkeller, Jun 18 2013
    
  • Mathematica
    sdssQ[n_]:=Module[{idn=IntegerDigits[n],s,len},s=Total[idn];len= IntegerLength[ s]; MemberQ[Partition[idn,len,1],IntegerDigits[s]]]; Join[{0},Select[Range[1100],sdssQ]] (* Harvey P. Dale, Jan 02 2013 *)
  • Python
    loop = (str(n) for n in range(399))
    print([int(n) for n in loop if str(sum(int(k) for k in n)) in n]) # Jonathan Frech, Jun 05 2017

A064438 Numbers which are divisible by the sum of their quaternary digits.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 20, 21, 24, 28, 30, 32, 33, 35, 36, 40, 42, 48, 50, 52, 54, 60, 63, 64, 66, 68, 69, 72, 76, 78, 80, 81, 84, 88, 90, 91, 96, 100, 102, 108, 112, 114, 120, 126, 128, 129, 132, 136, 138, 140, 144, 148, 150, 154, 156, 160, 162, 168, 171, 180
Offset: 1

Views

Author

Len Smiley, Oct 01 2001

Keywords

Comments

A good "puzzle" sequence -- guess the rule given the first twenty or so terms.

Examples

			Quaternary representation of 28 is 130, 1 + 3 + 0 = 4 divides 28.
		

Crossrefs

Cf. A005349 (decimal), A049445 (binary), A064150 (ternary).

Programs

  • ARIBAS
    maxarg := 190; for n := 1 to maxarg do if n mod sum(quaternarray(n)) = 0 then write(n," "); end; end; function quaternarray(n: integer): array; var k: integer; stk: stack; begin while n > 0 do k := n mod 4; stack_push(stk,k); n := (n - k) div 4; end; return stack2array(stk); end;
    
  • Mathematica
    Select[Range[200],Divisible[#,Total[IntegerDigits[#,4]]]&] (* Harvey P. Dale, Jun 09 2011 *)
  • PARI
    isok(n) = !(n % sumdigits(n, 4)); \\ Michel Marcus, Jun 24 2018
    
  • Python
    from sympy.ntheory.factor_ import digits
    print([n for n in range(1, 201) if n%sum(digits(n, 4)[1:]) == 0]) # Indranil Ghosh, Apr 24 2017

Extensions

More terms from Matthew Conroy, Oct 02 2001
Offset changed from 0 to 1 by Harry J. Smith, Sep 14 2009

A069537 Multiples of 2 whose digit sum is 2.

Original entry on oeis.org

2, 20, 110, 200, 1010, 1100, 2000, 10010, 10100, 11000, 20000, 100010, 100100, 101000, 110000, 200000, 1000010, 1000100, 1001000, 1010000, 1100000, 2000000, 10000010, 10000100, 10001000, 10010000, 10100000, 11000000, 20000000, 100000010, 100000100, 100001000
Offset: 1

Views

Author

Amarnath Murthy, Apr 01 2002

Keywords

Crossrefs

Cf. A002024, A002260, A088404 (half).
Subsequence of A005349.
Row n=2 of A245062.

Programs

  • PARI
    a(n) = my(r,s=sqrtint((n-1)<<1,&r), x=s+(r>s), y=if(r>s,r-s,r+s)>>1); 10^x + 10^y; \\ Kevin Ryde, Jul 17 2025
  • Python
    from itertools import product
    def agen():
      digits = 1
      while True:
        for i in range(digits-2): yield int("1"+"0"*(digits-3-i)+"1"+"0"*i+"0")
        yield int("2"+"0"*(digits-1))
        digits += 1
    g = agen()
    print([next(g) for i in range(32)]) # Michael S. Branicky, Feb 20 2021
    

Formula

a(n) = 10^A002024(n-1) + 10^A002260(n-1) for n >= 2. - Kevin Ryde, Jul 17 2025

Extensions

Corrected and extended by Ray Chandler, Sep 28 2003

A245062 Array read by upward antidiagonals: Niven (or Harshad) numbers arranged in rows by their digit sums.

Original entry on oeis.org

1, 2, 10, 3, 20, 100, 4, 12, 110, 1000, 5, 40, 21, 200, 10000, 6, 50, 112, 30, 1010, 100000, 7, 24, 140, 220, 102, 1100, 1000000, 8, 70, 42, 230, 400, 111, 2000, 10000000, 9, 80, 133, 60, 320, 1012, 120, 10010, 100000000, 190, 18, 152, 322, 114, 410, 1120, 201, 10100, 1000000000
Offset: 1

Views

Author

L. Edson Jeffery, Jul 10 2014

Keywords

Comments

The n-th row contains in increasing order all multiples of n with digit sum n.
See A005349 for definitions and references.

Examples

			Array begins as:
  1  10  100  1000  10000  100000  1000000  10000000  100000000  1000000000
  2  20  110   200   1010    1100     2000     10010      10100       11000
  3  12   21    30    102     111      120       201        210         300
  4  40  112   220    400    1012     1120      1300       2020        2200
  5  50  140   230    320     410      500      1040       1130        1220
  6  24   42    60    114     132      150       204        222         240
  7  70  133   322    511     700     1015      1141       1204        1330
  8  80  152   224    440     512      800      1016       1160        1232
  9  18   27    36     45      54       63        72         81          90
190 280  370   460    550     640      730       820        910        1090
		

Crossrefs

Cf. A002998 (column 1), A245065 (column 2).
Cf. A011557 (row 1), A069537 (row 2), A052217 (row 3), A063997 (row 4), A069540 (row 5), A062768 (row 6), A063416 (row 7), A069543 (row 8), A052223 (row 9).
Cf. A082260 (main diagonal).
Cf. A007953, A005349 (Niven or Harshad numbers).
Cf. A082259.

A331085 Positive negaFibonacci-Niven numbers: positive numbers divisible by the number of terms in their negaFibonacci representation (A331083).

Original entry on oeis.org

1, 2, 4, 5, 6, 9, 10, 12, 13, 14, 18, 24, 26, 27, 30, 34, 36, 48, 55, 60, 64, 68, 69, 72, 78, 84, 86, 87, 88, 89, 90, 93, 94, 96, 99, 100, 102, 108, 110, 112, 116, 120, 140, 144, 150, 155, 156, 160, 172, 176, 177, 178, 180, 183, 184, 188, 192, 195, 196, 200, 204
Offset: 1

Views

Author

Amiram Eldar, Jan 08 2020

Keywords

Comments

The k-th Fibonacci number is a term for all odd k, since its negaFibonacci representation is 1 followed by (k-1) zeros.

Examples

			4 is a term since the negaFibonacci representation of 4 is 10010 whose sum of digits is 1 + 0 + 0 + 1 + 0 = 2 which is a divisor of 4.
		

Crossrefs

Programs

  • Mathematica
    ind[n_] := Floor[Log[Abs[n]*Sqrt[5] + 1/2]/Log[GoldenRatio]]; f[1] = 1; f[n_] := If[n > 0, i = ind[n - 1]; If[EvenQ[i], i++]; i, i = ind[-n]; If[OddQ[i], i++]; i]; negaFibTermsNum[n_] := Module[{k = n, s = 0}, While[k != 0, i = f[k]; s += 1; k -= Fibonacci[-i]]; s]; Select[Range[200], Divisible[#, negaFibTermsNum[#]] &]

A001101 Moran numbers: k such that k/(sum of digits of k) is prime.

Original entry on oeis.org

18, 21, 27, 42, 45, 63, 84, 111, 114, 117, 133, 152, 153, 156, 171, 190, 195, 198, 201, 207, 209, 222, 228, 247, 261, 266, 285, 333, 370, 372, 399, 402, 407, 423, 444, 465, 481, 511, 516, 518, 531, 555, 558, 592, 603
Offset: 1

Views

Author

Bill Moran (moran1(AT)llnl.gov)

Keywords

Comments

Witno conjectures that a(n) ~ c*n log(n)^2 for some c. - Charles R Greathouse IV, Jul 26 2011

References

  • Bill Moran, Problem 2074: The Moran Numbers, J. Rec. Math., Vol. 25 No. 3, pp. 215, 1993.

Crossrefs

Subsequence of A005349, Niven (or Harshad) numbers.

Programs

  • Haskell
    import Data.List (findIndices)
    a001101 n = a001101_list !! (n-1)
    a001101_list = map succ $ findIndices p [1..] where
       p n = m == 0 && a010051 n' == 1 where
          (n', m) = divMod n (a007953 n)
    -- Reinhard Zumkeller, Jun 16 2011
    
  • Maple
    filter:= proc(n) local q;
      q:= n/convert(convert(n,base,10),`+`);
      q::integer and isprime(q)
    end proc:
    select(filter, [$1..1000]); # Robert Israel, May 13 2025
  • Mathematica
    Select[Range[700], PrimeQ[ # / Total[IntegerDigits[#]]]&] (* Jean-François Alcover, Nov 30 2011 *)
  • PARI
    is(n)=(k->denominator(k)==1&&isprime(k))(n/sumdigits(n)) \\ Charles R Greathouse IV, Jan 10 2014
    
  • Python
    from sympy import isprime
    def ok(n): s = sum(map(int, str(n))); return s and n%s==0 and isprime(n//s)
    print([k for k in range(604) if ok(k)]) # Michael S. Branicky, Mar 28 2022

Extensions

Name corrected by Charles R Greathouse IV, Jan 10 2014

A106039 Belgian-0 numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 17, 18, 20, 21, 22, 24, 26, 27, 30, 31, 33, 35, 36, 39, 40, 42, 44, 45, 48, 50, 53, 54, 55, 60, 62, 63, 66, 70, 71, 72, 77, 80, 81, 84, 88, 90, 93, 99, 100, 101, 102, 106, 108, 110, 111, 112, 114, 117, 120
Offset: 1

Views

Author

Eric Angelini, Jun 07 2005

Keywords

Comments

Given an integer -1 < k < 10, n is a Belgian-k number if an infinite sequence in ascending order can be constructed starting at k and including n, and the first differences of that sequence give the base 10 digits of n repeatedly and no others.
Mauro Fiorentini (see Angelini link) explains that all base 10 Harshad numbers (A005349) are also Belgian-0 numbers. - Alonso del Arte, Feb 13 2014
A257778(a(n)) = A257770(a(n),0) = 0. - Reinhard Zumkeller, May 08 2015
Every integer in this sequence is also a Belgian-k number, where k is the sum of digits of the integer. - Davide Rotondo, Jun 12 2024

Examples

			13 is a Belgian-0 number because of the sequence
0, 1, 4, 5, 8, 9, 12, 13, 16, 17, 20, ...
the first differences of which are
1, 3, 1, 3, 1, 3, 1, 3, 1, 3, ...
176 is a Belgian-0 number because, starting from 0 (the seed), one can build a sequence containing 176 in this way:
0.1.8.14.15.22.28.29.36.42.43.50.....155.162.168.169.176.... (sequence)
.1.7.6..1..7..6..1..7..6..1..7..........7...6...1...7.. (first differences)
14 is not a Belgian number because, although we can construct a sequence with the required starting point and the required first differences (namely 0, 1, 5, 6, 10, 11, 15, ...), that sequence does not contain 14.
		

Crossrefs

Cf. A257782 (complement), A253717 (primes).

Programs

  • Haskell
    a106039 n = a106039_list !! (n-1)
    a106039_list = filter belge0 [0..] where
       belge0 n = n == (head $ dropWhile (< n) $
                        scanl (+) 0 $ cycle ((map (read . return) . show) n))
    -- Reinhard Zumkeller, May 07 2015
  • Mathematica
    belgianQ[n_, k_] := If[n < k, False, Block[{id = Join[{0}, IntegerDigits@ n]}, MemberQ[ Accumulate@ id, Mod[n - k, Plus @@ id]] ]]; Select[ Range@ 120, belgianQ[#, 0] &] (* Robert G. Wilson v, May 06 2011 *)

Extensions

Offset changed by Reinhard Zumkeller, May 08 2015

A341169 Numbers that divided by the sum of their digits leave 2 as remainder.

Original entry on oeis.org

16, 22, 26, 32, 67, 82, 86, 122, 130, 142, 170, 172, 178, 184, 202, 205, 212, 242, 262, 302, 310, 314, 331, 338, 352, 359, 418, 442, 464, 466, 496, 520, 530, 532, 535, 590, 602, 622, 652, 665, 667, 712, 716, 754, 802, 818, 838, 842, 968, 971, 1022, 1024, 1030, 1034, 1072, 1091, 1094
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 06 2021

Keywords

Examples

			a(1) = 16 and 16 is 7*2 with remainder 2;
a(2) = 22 and 22 is 4*5 with remainder 2; etc.
		

Crossrefs

Cf. A005349 (Niven numbers: remainder = 0), A209871 (Quasi-Niven numbers: remainder = 1), A341169 to A341182 (remainders = 2 to 15).

A064481 Numbers which are divisible by the sum of their base-5 digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 18, 20, 24, 25, 26, 27, 28, 30, 32, 36, 40, 42, 45, 48, 50, 51, 52, 54, 56, 60, 63, 64, 65, 66, 72, 75, 76, 78, 80, 85, 88, 90, 91, 96, 99, 100, 102, 104, 105, 112, 117, 120, 125, 126, 128, 130, 132, 135, 136, 138, 140, 144, 145
Offset: 1

Views

Author

Klaus Brockhaus, Oct 03 2001

Keywords

Examples

			Base-5 representation of 28 is 103; 1 + 0 + 3 = 4 divides 28.
		

Crossrefs

Cf. A005349 (base 10), A049445 (base 2), A064150 (base 3), A064438 (base 4), A344341.

Programs

  • ARIBAS
    : maxarg := 160; for n := 1 to maxarg do if n mod sum(basearray(n,5)) = 0 then write(n," "); end; end; function basearray(n,b: integer): array; var k: integer; stk: stack; begin while n > 0 do k := n mod b; stack_push(stk,k); n := (n - k) div b; end; return stack2array(stk); end;.
    
  • PARI
    isok(n) = !(n % sumdigits(n, 5)); \\ Michel Marcus, Jun 24 2018

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Sep 15 2009

A334308 Base phi Niven numbers: numbers divisible by the number of 1's in their base phi representation (A055778).

Original entry on oeis.org

1, 2, 6, 12, 15, 16, 18, 20, 30, 35, 36, 45, 48, 55, 60, 70, 72, 78, 84, 90, 91, 95, 96, 98, 104, 108, 132, 144, 147, 154, 168, 175, 184, 189, 208, 224, 231, 232, 245, 252, 256, 261, 264, 270, 275, 280, 282, 287, 294, 315, 322, 324, 330, 336, 340, 342, 351, 357
Offset: 1

Views

Author

Amiram Eldar, Apr 22 2020

Keywords

Examples

			6 is a term since its base phi representation is 1010.0001, and the number of 1's is 3, which is a divisor of 6.
		

Crossrefs

Programs

  • Mathematica
    phiDigSum[1] = 1; phiDigSum[n_] := Plus @@ RealDigits[n, GoldenRatio, 2*Ceiling[ Log[GoldenRatio, n]] ][[1]]; Select[Range[360], Divisible[#, phiDigSum[#]] &]
Previous Showing 31-40 of 317 results. Next