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.

A144375 Records in A144262.

Original entry on oeis.org

11, 13, 161, 537, 3611, 537037, 740737, 1005291, 5290873, 216005291, 352733597, 9219175481, 16835016827, 1166734500037
Offset: 1

Views

Author

Klaus Brockhaus, Sep 19 2008

Keywords

Comments

14*10^11 < a(15) <= 6007881003256. [From Donovan Johnson, Jul 22 2010]

Crossrefs

Cf. A005349 (Niven numbers), A144262 (smallest k such that k*n is not a Niven number), A144376 (where records occur in A144262).

Extensions

a(11), a(12) from Klaus Brockhaus, Sep 30 2008
a(13)-a(14) from Donovan Johnson, Jul 22 2010

A144376 Where records occur in A144262.

Original entry on oeis.org

1, 10, 18, 54, 108, 540, 2700, 3780, 7560, 22680, 113400, 249480, 1247400, 3243240, 6486480
Offset: 1

Views

Author

Klaus Brockhaus, Sep 19 2008, Sep 30 2008

Keywords

Comments

a(16) >= 9729720. [From Donovan Johnson, Jul 22 2010]

Crossrefs

Cf. A005349 (Niven numbers), A144262 (smallest k such that k*n is not a Niven number), A144375 (records in A144262).

Extensions

a(13)-a(15) from Donovan Johnson, Jul 22 2010

A144261 a(n) = smallest k such that k*n is a Niven (or Harshad) number.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 9, 3, 2, 3, 6, 1, 6, 1, 1, 5, 9, 1, 2, 6, 1, 3, 9, 1, 12, 6, 4, 3, 2, 1, 3, 3, 3, 1, 10, 1, 12, 3, 1, 5, 9, 1, 8, 1, 2, 3, 18, 1, 2, 2, 2, 9, 9, 1, 12, 6, 1, 3, 3, 2, 3, 3, 3, 1, 18, 1, 7, 3, 2, 2, 4, 2, 9, 1, 1, 5, 18, 1, 6, 6, 3, 3, 9, 1, 4, 5, 4, 9, 2, 2, 12, 4, 2, 1
Offset: 1

Views

Author

Sergio Pimentel, Sep 16 2008

Keywords

Comments

Niven (or Harshad) numbers are numbers that are divisible by the sum of their digits.
Does a(n) exist for all n? - Klaus Brockhaus, Sep 19 2008

Examples

			a(14) = 3 since neither 1*14 or 2*14 are Niven numbers, but 3*14 = 42 is a Niven number: 42 = 7*(4+2).
		

Crossrefs

Cf. A005349 (Niven numbers), A144262 (smallest k such that k*n is not a Niven number), A144363 (records in A144261), A144364 (where records occur in A144261).

Programs

  • Mathematica
    niv[n_]:=Module[{k=1},While[!Divisible[k*n,Total[IntegerDigits[ k*n]]], k++]; k]; Array[niv,100] (* Harvey P. Dale, Jul 23 2016 *)
  • PARI
    digitsum(n) = {local(s=0); while(n, s+=n%10; n\=10); s}
    {for(n=1, 100, k=1; while((p=k*n)%digitsum(p)>0, k++); print1(k, ","))} /* Klaus Brockhaus, Sep 19 2008 */
    
  • Python
    from itertools import count
    def A144261(n): return next(filter(lambda k:not (m:=k*n) % sum(int(d) for d in str(m)), count(1))) # Chai Wah Wu, Nov 04 2022

Extensions

Edited and extended by Klaus Brockhaus, Sep 19 2008

A226169 Niven numbers when expressed in bases 1 through 10.

Original entry on oeis.org

1, 2, 4, 6, 24, 40, 48, 72, 120, 144, 180, 216, 252, 288, 324, 336, 360, 432, 504, 576, 648, 720, 756, 780, 840, 960, 1008, 1056, 1080, 1092, 1200, 1260, 1296, 1344, 1380, 1440, 1512, 1584, 1620, 1680, 1728, 1764, 1800, 1944, 2016, 2196, 2304, 2352, 2448
Offset: 1

Views

Author

Sergio Pimentel, May 29 2013

Keywords

Comments

The first 10 odd terms greater than 1 are a(1151) = 543375, 5329233, 18640125, 19178775, 23186625, 30131535, 35026425, 36797775, 46101825, 51856875. - Giovanni Resta, Jun 01 2013

Examples

			Example: 336 is in the sequence because the sum of digits of 336 when expressed in bases 1 through 10 is: 336, 3, 4, 3, 8, 6, 12, 7, 8, 12; and 336 is divisible by all these numbers.  In this particular example 336 keeps this property in bases 11, 12 and 13, but not 14.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^4], Catch[Do[If[Mod[#, Total@IntegerDigits[#, b]] > 0, Throw@ False], {b, 2, 10}]; True] &] (* Giovanni Resta, May 29 2013 *)
    t = Table[b = 2; While[s = Total[IntegerDigits[n, b]]; s < n && Mod[n, s] == 0, b++]; If[s == n, b = 0]; b, {n, 2000}]; Flatten[Position[t, ?(# == 0 || # > 10 &)]] (* _T. D. Noe, May 30 2013 *)

Extensions

Missing a(17) and a(35)-a(49) from Giovanni Resta, May 29 2013

A385485 a(n) is the least number k such that k*n is not a binary Niven number (A049445).

Original entry on oeis.org

3, 7, 1, 7, 1, 5, 1, 7, 1, 3, 1, 29, 1, 1, 1, 7, 1, 3, 1, 5, 3, 1, 1, 29, 1, 1, 1, 1, 1, 1, 1, 7, 1, 3, 1, 13, 1, 1, 1, 5, 1, 5, 1, 1, 1, 1, 1, 29, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 17, 1, 1, 1, 7, 1, 3, 1, 7, 3, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 5, 3, 1, 1, 17, 1
Offset: 1

Views

Author

Amiram Eldar, Jun 30 2025

Keywords

Comments

All the terms are odd numbers because if k is even and k*n is not a binary Niven number then so is k*n/2, since A000120(k*n) = A000120(k*n/2).

Crossrefs

Cf. A000120, A049445, A065878, A144262 (decimal analog), A385482, A385486 (indices of records), A385487 (record values).

Programs

  • Mathematica
    a[n_] := Module[{m = n, k = 1}, While[Divisible[m, DigitSum[m, 2]], m += 2*n; k += 2]; k]; Array[a, 100]
  • PARI
    a(n) = {my(m = n, k = 1); while(!(m % hammingweight(m)), m += 2*n; k += 2); k;}
    
  • Python
    from itertools import count
    def a(n): return next(k for k in count(1) if (m:=k*n)%m.bit_count() != 0)
    print([a(n) for n in range(1, 86)]) # Michael S. Branicky, Jun 30 2025

Formula

a(n) = 1 if and only if n is in A065878.

A226171 Smallest base in which n is not Niven (or zero if n is Niven in every base).

Original entry on oeis.org

0, 0, 2, 0, 2, 0, 2, 6, 2, 4, 2, 8, 2, 2, 2, 6, 2, 8, 2, 7, 5, 2, 2, 14, 2, 2, 2, 2, 2, 2, 2, 6, 2, 3, 2, 8, 2, 2, 2, 12, 2, 3, 2, 2, 2, 2, 2, 14, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 8, 2, 2, 2, 6, 2, 3, 2, 3, 3, 2, 2, 14, 2, 2, 2, 2, 2, 2, 2, 8, 5, 2, 2, 5, 2, 2
Offset: 1

Views

Author

Sergio Pimentel, May 29 2013

Keywords

Comments

Niven numbers (in base b) are divisible by the sum of their digits (in base b).
Questions: are 1, 2, 4 and 6 the only zeros in this sequence? Where are the records or high water marks?
From Bert Dobbelaere, Oct 08 2018: (Start)
1,2,4,6 are the only numbers that are Niven in every base.
Proof: Suppose n is Niven in every base, then consider the base-b representations of n for (n/2) < b <= n. These are all 2-digit numbers with 1 as 1st digit and (n-b) as last digit. Then 1+n-b is a divisor of n for all b, meaning that all numbers between 1 up to n/2 are divisors of n. Clearly there are no such numbers larger than 6.
a(n) < 60 for n < 10^13.
(End)

Examples

			The sum of digits of 24 in bases 1 through 14 are:  24, 2, 4, 3, 8, 4, 6, 3, 8, 6, 4, 2, 12, 11.  24 is divisible by all these numbers except the last one; therefore a(24) = 14.
		

Crossrefs

Cf. A225427 (least Niven number for all bases from 1 to n).

Programs

  • Mathematica
    Table[b = 2; While[s = Total[IntegerDigits[n, b]]; s < n && Mod[n, s] == 0, b++]; If[s == n, b = 0]; b, {n, 100}] (* T. D. Noe, May 30 2013 *)
  • PARI
    a(n) = {for (b=2, n-1, if (frac(n/sumdigits(n,b)), return(b));); 0;} \\ Michel Marcus, Oct 23 2018

A357937 a(n) is the least multiple of n that is not a Niven (or Harshad) number.

Original entry on oeis.org

11, 14, 15, 16, 15, 66, 14, 16, 99, 130, 11, 96, 13, 14, 15, 16, 17, 2898, 19, 160, 105, 22, 23, 96, 25, 26, 189, 28, 29, 390, 31, 32, 33, 34, 35, 2988, 37, 38, 39, 160, 41, 168, 43, 44, 495, 46, 47, 96, 49, 250, 51, 52, 53, 28998, 55, 56, 57, 58, 59, 4980, 61
Offset: 1

Views

Author

Rémy Sigrist, Oct 21 2022

Keywords

Comments

Niven (or Harshad) numbers are divisible by the sum of their digits, and correspond to sequence A005349.

Examples

			For n = 3, we have:
.
      k  3*k  Niven?
      -  ---  ------
      1    3  Yes
      2    6  Yes
      3    9  Yes
      4   12  Yes
      5   15  No
so a(3) = 15.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{k=1}, While[Divisible[k*n, Total[IntegerDigits[k*n]]], k++]; k*n]; Array[a, 61]
  • PARI
    a(n, base=10) = forstep (m=n, oo, n, if (m%sumdigits(m, base), return (m)))

Formula

a(n) = n * A144262(n).

A144378 Initial term of a series of exactly n consecutive non-Niven (or Harshad) numbers.

Original entry on oeis.org

11, 22, 37, 136, 13, 64, 73, 163, 91, 1730, 289, 1639, 379, 1660, 2737, 919, 559, 14878, 7561, 5671, 9753, 2890, 7777, 4888, 5785, 5590, 27973, 47872, 28681, 22681, 3785, 36184, 46281, 71281, 6481, 48952, 48763, 64978, 119773, 69782, 77881, 55973
Offset: 1

Views

Author

Sergio Pimentel, Sep 18 2008

Keywords

Comments

Multiples of 18 seem to be the high water marks, while terms of the form 18n - 1 seem to be the valleys of this sequence.
Many terms end in '81' for some reason.
This sequence is analog to A060159 with non-Niven numbers.
This sequence is infinite, as opposed as A060159.

Examples

			a(5) = 13 since 13, 14, 15, 16 and 17 are all non-Niven numbers and this is the first occurrence of exactly 5 non-Niven numbers.
		

Crossrefs

Programs

  • PARI
    digitsum(n) = {local(s=0); while(n, s+=n%10; n\=10); s}
    {m=120000; z=42; w=vector(z); n=1; while(n<=m, while(n%digitsum(n)==0, n++); a=n; c=0; while(n%digitsum(n)>0, n++; c++); if(c<=z&&w[c]==0, w[c]=a)); j=1; while(j<=z&&w[j]>0, print1(w[j], ","); j++)} /* Klaus Brockhaus, Sep 24 2008 */

Extensions

a(2), a(22), a(42) corrected by Klaus Brockhaus, Sep 24 2008
Showing 1-8 of 8 results.