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 36 results. Next

A328205 Numbers m such that m and m+1 are consecutive factorial base Niven numbers (A118363).

Original entry on oeis.org

1, 8, 26, 35, 90, 122, 244, 245, 300, 384, 440, 510, 722, 804, 844, 845, 935, 944, 984, 1014, 1079, 1224, 1232, 1444, 1445, 1518, 1584, 1589, 1727, 1728, 1736, 1770, 1880, 2159, 2184, 2232, 2240, 2528, 2540, 2650, 2820, 2980, 3032, 3263, 3640, 4199, 4328, 4848
Offset: 1

Views

Author

Amiram Eldar, Oct 07 2019

Keywords

Comments

Dahlenberg & Edgar proved that this sequence is infinite.

Examples

			8 is in the sequence since both 8 and 9 are in A118363. A034968(8) = 2 is a divisor of 8 and A034968(9) = 3 is a divisor of 9.
		

Crossrefs

Programs

  • Mathematica
    sf[n_] := Module[{s = 0, i = 2, k = n}, While[k > 0, k = Floor[n/i!]; s = s + (i - 1)*k; i++]; n - s]; fnQ[n_] := Divisible[n, sf[n]]; aQ[n_] := AllTrue[n + Range[0, 1], fnQ]; Select[Range[5000], aQ] (* after Jean-François Alcover at A034968 *)

A328206 Starts of runs of 3 consecutive factorial base Niven numbers (A118363).

Original entry on oeis.org

244, 844, 1444, 1727, 5164, 5764, 5950, 10084, 10967, 13583, 15190, 20207, 21130, 22048, 40444, 40535, 41044, 45364, 45550, 56015, 60730, 62848, 63479, 80644, 91408, 132208, 153340, 163799, 173008, 176110, 178007, 195983, 242368, 280852, 283168, 363004, 363604
Offset: 1

Views

Author

Amiram Eldar, Oct 07 2019

Keywords

Comments

Dahlenberg & Edgar proved that this sequence is infinite.

Examples

			244 is in the sequence since 244, 245 and 246 are in A118363. A034968(244) = 4 is a divisor of 244, A034968(245) = 5 is a divisor of 245, and A034968(246) = 3 is a divisor of 246.
		

Crossrefs

Programs

  • Mathematica
    sf[n_] := Module[{s = 0, i = 2, k = n}, While[k > 0, k = Floor[n/i!]; s = s + (i - 1)*k; i++]; n - s]; fnQ[n_] := Divisible[n, sf[n]]; aQ[n_] := AllTrue[n + Range[0, 2], fnQ]; Select[Range[400000], aQ] (* after Jean-François Alcover at A034968 *)

A328207 Starts of runs of 4 consecutive factorial base Niven numbers (A118363).

Original entry on oeis.org

9320542, 11397166, 29048470, 29394574, 40469902, 40816006, 58467310, 72657574, 84079006, 101730310, 178911502, 200716054, 283088806, 479329774, 485213542, 499403806, 528476542, 530553166, 544743430, 559625902, 559972006, 574162270, 603235006, 617425270, 641652550
Offset: 1

Views

Author

Amiram Eldar, Oct 07 2019

Keywords

Comments

Dahlenberg & Edgar proved that this sequence is infinite and that there are no consecutive runs of 5 or more factorial base Niven numbers.
a(1)-a(18) were calculated by Dahlenberg & Edgar.

Examples

			9320542 is in the sequence since 9320542, 9320543, 9320544 and 9320545 are all in A118363: A034968(9320542) = 22 is a divisor of 9320542, A034968(9320543) = 23 is a divisor of 9320543, A034968(9320544) = 18 is a divisor of 9320544, and A034968(9320545) = 19 is a divisor of 9320545.
		

Crossrefs

Programs

  • Mathematica
    sf[n_] := Module[{s = 0, i = 2, k = n}, While[k > 0, k = Floor[n/i!]; s = s + (i - 1)*k; i++]; n - s]; fnQ[n_] := Divisible[n, sf[n]]; aQ[n_] := AllTrue[n + Range[0, 3], fnQ]; Select[Range[10^8], aQ] (* after Jean-François Alcover at A034968 *)

A377385 Factorial-base Niven numbers (A118363) k such that k/f(k) is also a factorial-base Niven number, where f(k) = A034968(k) is the sum of digits in the factorial-base representation of k.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 24, 27, 36, 40, 48, 54, 72, 80, 96, 108, 120, 135, 144, 168, 175, 180, 192, 208, 210, 240, 280, 288, 336, 360, 384, 420, 432, 468, 480, 490, 572, 576, 594, 600, 630, 720, 732, 740, 750, 780, 784, 819, 840, 846, 861, 864, 888, 900, 924, 936, 945, 980, 984
Offset: 1

Views

Author

Amiram Eldar, Oct 27 2024

Keywords

Examples

			8 is a term since 8/f(8) = 4 is an integer and also 4/f(4) = 2 is an integer.
		

Crossrefs

Subsequence of A118363.
Subsequences: A000142, A377386.
Analogous sequences: A376616 (binary), A377209 (Zeckendorf).

Programs

  • Mathematica
    fdigsum[n_] := Module[{k = n, m = 2, r, s = 0}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, s += r; m++]; s]; q[k_] := Module[{f = fdigsum[k]}, Divisible[k, f] && Divisible[k/f, fdigsum[k/f]]]; Select[Range[1000], q]
  • PARI
    fdigsum(n) = {my(k = n, m = 2, r, s = 0); while([k, r] = divrem(k, m); k != 0 || r != 0, s += r; m++); s;}
    is(k) = {my(f = fdigsum(k)); !(k % f) && !((k/f) % fdigsum(k/f));}

A377386 Factorial-base Niven numbers (A118363) k such that m = k/f(k) and m/f(m) are also factorial-base Niven numbers, where f(k) = A034968(k) is the sum of digits in the factorial-base representation of k.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 24, 36, 40, 48, 54, 72, 80, 96, 108, 120, 135, 144, 180, 192, 240, 280, 288, 360, 384, 432, 480, 576, 594, 600, 720, 840, 864, 1200, 1215, 1225, 1296, 1344, 1440, 1680, 1728, 1800, 2160, 2240, 2352, 2400, 2520, 2592, 2704, 2730, 2880, 3000
Offset: 1

Views

Author

Amiram Eldar, Oct 27 2024

Keywords

Examples

			16 is a term since 16/f(16) = 4 is an integer, 4/f(4) = 2 is an integer, and 2/f(2) = 2 is an integer.
		

Crossrefs

Subsequence of A118363 and A377385.
A000142 is a subsequence.
Analogous sequences: A376617 (binary), A377210 (Zeckendorf).

Programs

  • Mathematica
    fdigsum[n_] := Module[{k = n, m = 2, r, s = 0}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, s += r; m++]; s]; q[k_] := Module[{f = fdigsum[k], f2, m, n}, IntegerQ[m = k/f] && Divisible[m, f2 = fdigsum[m]] && Divisible[n = m/f2, fdigsum[n]]]; Select[Range[3000], q]
  • PARI
    fdigsum(n) = {my(k = n, m = 2, r, s = 0); while([k, r] = divrem(k, m); k != 0 || r != 0, s += r; m++); s;}
    is(k) = {my(f = fdigsum(k), f2, m); if(k % f, return(0)); m = k/f; f2 = fdigsum(m); !(m % f2) && !((m/f2) % fdigsum(m/f2)); }

A347495 Factorial base Niven numbers (A118363) with a record gap to the next factorial base Niven number.

Original entry on oeis.org

1, 2, 9, 12, 30, 40, 60, 192, 224, 318, 550, 640, 1136, 1989, 4875, 4980, 23355, 24272, 24378, 40131, 60192, 63872, 80472, 238680, 280140, 2027340, 2872620, 3622068, 13400475, 21293094, 25399080, 28584626, 111020840, 278690360, 355419734, 398884590, 834592590
Offset: 1

Views

Author

Amiram Eldar, Sep 03 2021

Keywords

Comments

The corresponding gaps are 1, 2, 3, 4, 5, 8, 10, 12, 16, 18, 20, 32, 34, 39, 52, 55, 60, 67, 82, 85, 90, 96, 154, 174, 210, 216, 222, 268, 297, 318, 336, 346, 430, 466, 517, 546, 604, ...

Examples

			The first 8 factorial base Niven numbers are 1, 2, 4, 6, 8, 9, 12 and 16. The gaps between them are 1, 2, 2, 2, 1, 3 and 4. The record gaps, 1, 2, 3 and 4, occur after the terms 1, 2, 9 and 12.
		

Crossrefs

Programs

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

A005349 Niven (or Harshad, or harshad) numbers: numbers that are divisible by the sum of their digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42, 45, 48, 50, 54, 60, 63, 70, 72, 80, 81, 84, 90, 100, 102, 108, 110, 111, 112, 114, 117, 120, 126, 132, 133, 135, 140, 144, 150, 152, 153, 156, 162, 171, 180, 190, 192, 195, 198, 200, 201, 204
Offset: 1

Views

Author

Keywords

Comments

Both spellings, "Harshad" or "harshad", are in use. It is a Sanskrit word, and in Sanskrit there is no distinction between upper- and lower-case letters. - N. J. A. Sloane, Jan 04 2022
z-Niven numbers are numbers n which are divisible by (A*s(n) + B) where A, B are integers and s(n) is sum of digits of n. Niven numbers have A = 1, B = 0. - Ctibor O. Zizka, Feb 23 2008
A070635(a(n)) = 0. A038186 is a subsequence. - Reinhard Zumkeller, Mar 10 2008
A049445 is a subsequence of this sequence. - Ctibor O. Zizka, Sep 06 2010
Complement of A065877; A188641(a(n)) = 1; A070635(a(n)) = 0. - Reinhard Zumkeller, Apr 07 2011
A001101, the Moran numbers, are a subsequence. - Reinhard Zumkeller, Jun 16 2011
A140866 gives the number of terms <= 10^k. - Robert G. Wilson v, Oct 16 2012
The asymptotic density of this sequence is 0 (Cooper and Kennedy, 1984). - Amiram Eldar, Jul 10 2020
From Amiram Eldar, Oct 02 2023: (Start)
Named "Harshad numbers" by the Indian recreational mathematician Dattatreya Ramchandra Kaprekar (1905-1986) in 1955. The meaning of the word is "giving joy" in Sanskrit.
Named "Niven numbers" by Kennedy et al. (1980) after the Canadian-American mathematician Ivan Morton Niven (1915-1999). During a lecture given at the 5th Annual Miami University Conference on Number Theory in 1977, Niven mentioned a question of finding a number that equals twice the sum of its digits, which appeared in the children's pages of a newspaper. (End)

Examples

			195 is a term of the sequence because it is divisible by 15 (= 1 + 9 + 5).
		

References

  • Paul Dahlenberg and T. Edgar, Consecutive factorial base Niven numbers, Fib. Q., 56:2 (2018), 163-166.
  • D. R. Kaprekar, Multidigital Numbers, Scripta Math., Vol. 21 (1955), p. 27.
  • Robert E. Kennedy and Curtis N. Cooper, On the natural density of the Niven numbers, Abstract 816-11-219, Abstracts Amer. Math. Soc., 6 (1985), 17.
  • Robert E. Kennedy, Terry A. Goodman, and Clarence H. Best, Mathematical Discovery and Niven Numbers, The MATYC Journal, Vol. 14, No. 1 (1980), pp. 21-25.
  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 381.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, 171.

Crossrefs

Cf. A001102 (a subsequence).
Cf. A118363 (for factorial-base analog).
Cf. A330927, A154701, A141769, A330928, A330929, A330930 (start of runs of 2, 3, ..., 7 consecutive Niven numbers).

Programs

  • GAP
    Filtered([1..230],n-> n mod List(List([1..n],ListOfDigits),Sum)[n]=0); # Muniru A Asiru
  • Haskell
    a005349 n = a005349_list !! (n-1)
    a005349_list = filter ((== 0) . a070635) [1..]
    -- Reinhard Zumkeller, Aug 17 2011, Apr 07 2011
    
  • Magma
    [n: n in [1..250] | n mod &+Intseq(n) eq 0];  // Bruno Berselli, May 28 2011
    
  • Magma
    [n: n in [1..250] | IsIntegral(n/&+Intseq(n))];  // Bruno Berselli, Feb 09 2016
    
  • Maple
    s:=proc(n) local N:N:=convert(n,base,10):sum(N[j],j=1..nops(N)) end:p:=proc(n) if floor(n/s(n))=n/s(n) then n else fi end: seq(p(n),n=1..210); # Emeric Deutsch
  • Mathematica
    harshadQ[n_] := Mod[n, Plus @@ IntegerDigits@ n] == 0; Select[ Range[1000], harshadQ] (* Alonso del Arte, Aug 04 2004 and modified by Robert G. Wilson v, Oct 16 2012 *)
    Select[Range[300],Divisible[#,Total[IntegerDigits[#]]]&] (* Harvey P. Dale, Sep 07 2015 *)
  • PARI
    is(n)=n%sumdigits(n)==0 \\ Charles R Greathouse IV, Oct 16 2012
    
  • Python
    A005349 = [n for n in range(1,10**6) if not n % sum([int(d) for d in str(n)])] # Chai Wah Wu, Aug 22 2014
    
  • Sage
    [n for n in (1..10^4) if sum(n.digits(base=10)).divides(n)] # Freddy Barrera, Jul 27 2018
    

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

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[#]] &]

A342426 Niven numbers in base 3/2: numbers divisible by their sum of digits in fractional base 3/2 (A244040).

Original entry on oeis.org

1, 2, 6, 9, 14, 21, 40, 42, 56, 72, 84, 108, 110, 120, 126, 130, 143, 154, 156, 162, 165, 168, 169, 176, 180, 182, 189, 198, 220, 225, 231, 243, 252, 280, 288, 297, 306, 308, 320, 322, 330, 336, 348, 350, 364, 390, 423, 430, 432, 459, 460, 462, 480, 490, 504
Offset: 1

Views

Author

Amiram Eldar, Mar 11 2021

Keywords

Examples

			6 is a term since its representation in base 3/2 is 210 and 2 + 1 + 0 = 3 is a divisor of 6.
9 is a term since its representation in base 3/2 is 2100 and 2 + 1 + 0 + 0 = 3 is a divisor of 9.
		

Crossrefs

Subsequences: A342427, A342428, A342429.
Similar sequences: A005349 (decimal), A049445 (binary), A064150 (ternary), A064438 (quaternary), A064481 (base 5), A118363 (factorial), A328208 (Zeckendorf), A328212 (lazy Fibonacci), A331085 (negaFibonacci), A333426 (primorial), A334308 (base phi), A331728 (negabinary).

Programs

  • Mathematica
    s[0] = 0; s[n_] := s[n] = s[2*Floor[n/3]] + Mod[n, 3]; q[n_] := Divisible[n, s[n]]; Select[Range[500], q]
Showing 1-10 of 36 results. Next