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.

A100263 Values of n such that A080221(n)=5; i.e., values of n such that n is divisible by the sum of digits of n when expressed in exactly 5 of the bases b=1...n.

Original entry on oeis.org

9, 14, 22, 38, 46, 58, 62, 74, 86, 94, 106, 118, 134, 142, 146, 158, 166, 178, 194, 202, 206, 214, 218, 254, 262, 274, 278, 298, 302, 314, 326, 334, 346, 358, 382, 386, 394, 398, 422, 446, 454, 458, 466, 478, 482, 502, 526, 538, 542, 554, 562, 566, 586, 614
Offset: 1

Views

Author

John W. Layman, Nov 10 2004

Keywords

Comments

It appears that, except for the first term a(1)=9, each term of this sequence is twice a prime.
Besides base 1, and bases b>=n (bases greater than or equal to the number itself), for which any number can be a Harshad number, these numbers are Harshad numbers in 3 other bases (where b=2..n-1): b1, b2, and b3, where b1 is n/2, b2 is n/2 + 1, b3 is n-1. Except for a(1)=9 that is a Harshad number in bases 3, 4 and 7. - Daniel Mondot, Apr 03 2016

Examples

			9 is a Harshad number in bases 3, 4 and 7 (not following pattern);
14 is a Harshad number in bases  7,  8 and 13;
22 is a Harshad number in bases 11, 12 and 21;
38 is a Harshad number in bases 19, 20 and 37;
46 is a Harshad number in bases 23, 24 and 45;
58 is a Harshad number in bases 29, 30 and 57;
62 is a Harshad number in bases 31, 32 and 61;
74 is a Harshad number in bases 37, 38 and 73;
86 is a Harshad number in bases 43, 44 and 85;
94 is a Harshad number in bases 47, 48 and 93;
47 = 94/2, 48 = 94/2 + 1, 93 = 94 - 1. - _Daniel Mondot_, Apr 03 2016
		

Crossrefs

A271311 Values of n such that A080221(n)=6; i.e., values of n such that n is divisible by the sum of digits of n when expressed in exactly 6 of the bases b=1...n.

Original entry on oeis.org

6, 26, 34, 122, 226, 362, 514, 842, 1226, 1522, 2026, 2602, 3482, 3722, 4226, 4762, 5042, 6242, 7226, 9026, 10202, 17162, 19322, 19882, 21026, 25282, 27226, 29242, 30626, 32762, 38026, 39602, 40402, 42026, 43682, 47962, 48842, 53362, 60026, 68122, 73442, 75626
Offset: 1

Views

Author

Daniel Mondot, Apr 03 2016

Keywords

Comments

Besides base 1, and bases b>=n (bases greater than or equal to the number itself), for which any number can be a Harshad number, these numbers are Harshad numbers in 4 other bases (where b=2...n-1): b1, b2, b3, and b4, where:
They can be separated in 2 distinct groups:
* Most numbers are Harshad numbers in 4 bases that follow pattern A:
- b1 is sqrt(n-1) (n-1 being a square)
- b2 is n/2
- b3 is n/2 + 1
- b4 is n-1
* Some numbers are Harshad numbers in 4 bases that follow pattern B:
- b1 is 2 (n-1 is not a square)
- b2 is n/2
- b3 is n/2 + 1
- b4 is n-1
This is true for n = 6, 34, 514, 131074, etc...

Examples

			6 is a Harshad number in bases 2, 3, 4 and 5:              Pattern B
26 is a Harshad number in bases 5, 13, 14 and 25:          Pattern A
34 is a Harshad number in bases 2, 17, 18 and 33:          Pattern B
122 is a Harshad number in bases 11, 61, 62 and 121:       Pattern A
226 is a Harshad number in bases 15, 113, 114 and 225:     Pattern A
362 is a Harshad number in bases 19, 181, 182 and 361:     Pattern A
514 is a Harshad number in bases 2, 257, 258 and 513:      Pattern B
842 is a Harshad number in bases 29, 421, 422 and 841:     Pattern A
1226 is a Harshad number in bases 35, 613, 614 and 1225:   Pattern A
1522 is a Harshad number in bases 39, 761, 762 and 1521:   Pattern A
2026 is a Harshad number in bases 45, 1013, 1014 and 2025: Pattern A
Pattern A: 45=sqrt(2026-1), 1013=2026/2, 1014=2026/2+1, 2025=2026-1
Pattern B: 2=2, 257=514/2, 258=514/2+1, 513=514-1.
		

Crossrefs

Programs

  • PARI
    isok(n) = {nb = 1; for (b=2, n, if ((n % (vecsum(digits(n, b)))) == 0, nb++);); nb == 6;} \\ Michel Marcus, Apr 03 2016

A271313 Values of n such that A080221(n)=7; i.e., values of n such that n is divisible by the sum of digits of n when expressed in exactly 7 of the bases b=1...n.

Original entry on oeis.org

8, 10, 25, 49, 82, 121, 141, 159, 177, 213, 219, 237, 267, 303, 309, 411, 417, 447, 453, 471, 501, 519, 529, 537, 543, 573, 591, 597, 626, 633, 669, 681, 699, 717, 753, 771, 789, 807, 831, 849, 879, 921, 933, 939, 951, 1047, 1077, 1119, 1137, 1149, 1167, 1203
Offset: 1

Views

Author

Daniel Mondot, Apr 03 2016

Keywords

Comments

Besides base 1, and bases b>=n (bases greater than or equal to the number itself), for which any number can be a Harshad number, these numbers are Harshad numbers in 5 other bases (where b=2...n-1): b1, b2, b3, b4, and b5, where:
They can be separated in 4 distinct groups.
* The first 3 entries (n=8, 10 and 25) are Harshad numbers in bases that do not follow other patterns.
* Most numbers are Harshad numbers in 5 bases that follow pattern A:
- b1 = n/3
- b2 = n/3+1
- b3 = (n-1)/2
- b4 = 2*n/3+1
- b5 = n-2
* Some numbers are Harshad numbers in 5 bases that follow pattern B:
- b1 = sqrt(sqrt(n-1))
- b2 = sqrt(n-1)
- b3 = n/2
- b4 = (n/2)+1
- b5 = n-1
* Some numbers are Harshad numbers in 5 bases that follow pattern C:
- b1 = sqrt(n)
- b2 = sqrt(n)+1
- b3 = 2*sqrt(n)+1
- b4 = (n+2-sqrt(n))/2
- b5 = (n+1-sqrt(n))

Examples

			8 is a Harshad number in bases 2, 3, 4, 5 and 7:            no pattern
10 is a Harshad number in bases 2, 3, 5, 6 and 9:           no pattern
25 is a Harshad number in bases 3, 5, 6, 11 and 21:         no pattern
49 is a Harshad number in bases 7, 8, 15, 22 and 43:        pattern C
82 is a Harshad number in bases 3, 9, 41, 42 and 81:        pattern B
121 is a Harshad number in bases 11, 12, 23, 56 and 111:    pattern C
141 is a Harshad number in bases 47, 48, 70, 95 and 139:    pattern A
159 is a Harshad number in bases 53, 54, 79, 107 and 157:   pattern A
177 is a Harshad number in bases 59, 60, 88, 119 and 175:   pattern A
213 is a Harshad number in bases 71, 72, 106, 143 and 211:  pattern A
219 is a Harshad number in bases 73, 74, 109, 147 and 217:  pattern A
237 is a Harshad number in bases 79, 80, 118, 159 and 235:  pattern A
267 is a Harshad number in bases 89, 90, 133, 179 and 265:  pattern A
Pattern A: 47=141/3, 48=141/3+1, 70=(141-1)/2, 95=(2*141/3)+1, 139=141-2
Pattern B: 3=sqrt(sqrt(82-1)), 9=sqrt(82-1), 41=82/2, 42=82/2+1, 81=82-1
Pattern C: 7=sqrt(49), 8=sqrt(49)+1, 15=2*sqrt(49)+1, 22=(49+2-sqrt(49))/2, 43=49+1-sqrt(49)
List of n that follow pattern B: 82, 626, 2402, 14642, 28562, 83522, etc...
List of n that follow pattern C: 49, 121, 529, 2209, 3481, 6889, 11449, 27889, 32041, 51529, 69169, 120409, 128881, etc...
List of n that follow pattern A: all others not already mentioned above.
		

Crossrefs

Programs

  • PARI
    isok(n) = {nb = 1; for (b=2, n, if ((n % (vecsum(digits(n, b)))) == 0, nb++);); nb == 7;} \\ Michel Marcus, Apr 03 2016

A356555 Irregular triangle T(n, k), n > 0, k = 1..A080221(n) read by rows; the n-th row contains, in ascending order, the bases b from 2..n+1 where the sum of digits of n divides n.

Original entry on oeis.org

2, 2, 3, 3, 4, 2, 3, 4, 5, 5, 6, 2, 3, 4, 5, 6, 7, 7, 8, 2, 3, 4, 5, 7, 8, 9, 3, 4, 7, 9, 10, 2, 3, 5, 6, 9, 10, 11, 11, 12, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 13, 14, 7, 8, 13, 14, 15, 3, 5, 6, 7, 11, 13, 15, 16, 2, 3, 4, 5, 7, 8, 9, 13, 15, 16, 17, 17, 18
Offset: 1

Views

Author

Rémy Sigrist, Aug 12 2022

Keywords

Comments

A080221 provides row lengths (note that for n > 0, we consider the base n+1 but not the base 1, unlike A080221 that considers the base 1 but not the base n+1, however this does not matter as the sums of digits of n in base 1 and base n+1 are the same).

Examples

			Triangle T(n, k) begins:
    n    n-th row
    --   --------
     1   [2]
     2   [2, 3]
     3   [3, 4]
     4   [2, 3, 4, 5]
     5   [5, 6]
     6   [2, 3, 4, 5, 6, 7]
     7   [7, 8]
     8   [2, 3, 4, 5, 7, 8, 9]
     9   [3, 4, 7, 9, 10]
    10   [2, 3, 5, 6, 9, 10, 11]
    11   [11, 12]
    12   [2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13]
    13   [13, 14]
    14   [7, 8, 13, 14, 15]
    15   [3, 5, 6, 7, 11, 13, 15, 16]
    16   [2, 3, 4, 5, 7, 8, 9, 13, 15, 16, 17]
    17   [17, 18]
		

Crossrefs

Programs

  • PARI
    row(n) = select(b -> n % sumdigits(n,b)==0, [2..n+1])
    
  • Python
    from sympy.ntheory import digits
    def row(n): return [b for b in range(2, n+2) if n%sum(digits(n, b)[1:])==0]
    print([an for n in range(1, 18) for an in row(n)]) # Michael S. Branicky, Aug 12 2022

Formula

T(n, 1) = A356552(n).
T(n, A080221(n)-1) = n for n > 1.
T(n, A080221(n)) = n+1.

A330813 Numbers k that are Niven numbers in a record number of bases 1 <= b <= k.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 18, 24, 36, 48, 60, 72, 96, 120, 144, 168, 180, 240, 336, 360, 480, 600, 630, 672, 720, 840, 1080, 1260, 1440, 1680, 2160, 2520, 3360, 4320, 5040, 7560, 10080, 15120, 20160, 25200, 27720, 30240, 40320, 45360, 50400, 55440, 60480, 75600, 83160
Offset: 1

Views

Author

Amiram Eldar, Jan 01 2020

Keywords

Comments

Indices of records of A080221.

Examples

			4 is a term since it is a Niven number in 4 bases: 1, 2, 3, 4, while the numbers below 4 are Niven numbers in less than 4 bases.
		

Crossrefs

Programs

  • Mathematica
    nivenQ[n_, b_] := Divisible[n, Total @ IntegerDigits[n, b]]; basesCount[n_] := 1 + Sum[Boole @ nivenQ[n, b], {b, 2, n}]; bmax = 0; seq = {}; Do[b = basesCount[n]; If[b > bmax ,bmax = b; AppendTo[seq,n]],{n,1,1000}];seq

A341434 a(n) is the number of bases 1 < b < n in which n is divisible by its product of digits.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 2, 3, 2, 2, 1, 5, 2, 3, 4, 6, 1, 5, 1, 5, 4, 4, 1, 9, 2, 2, 4, 5, 1, 7, 3, 9, 4, 2, 3, 12, 1, 2, 3, 10, 1, 7, 2, 7, 7, 2, 1, 15, 2, 5, 3, 6, 1, 10, 3, 10, 4, 3, 1, 14, 1, 2, 7, 14, 3, 8, 1, 6, 3, 6, 1, 20, 2, 3, 8, 7, 3, 7, 1, 16, 7, 2, 1, 14
Offset: 1

Views

Author

Amiram Eldar, Feb 11 2021

Keywords

Examples

			a(3) = 1 since 3 is divisible by its product of digits only in base 2: 3 = 11_2 and 1*1 | 3.
a(6) = 2 since 6 is divisible by its product of digits in 2 bases: in base 4, 6 = 12_4 and 1*2 | 6, and in base 5, 6 = 11_5 and 1*1 | 6.
		

Crossrefs

Programs

  • Mathematica
    q[n_, b_] := (p = Times @@ IntegerDigits[n, b]) > 0 && Divisible[n, p]; a[n_] := Count[Range[2, n], _?(q[n, #] &)]; Array[a, 100]
  • PARI
    a(n) = sum(b=2, n-1, my(x=vecprod(digits(n, b))); x && !(n%x)); \\ Michel Marcus, Feb 12 2021

Formula

a(n) > 0 for all numbers n > 2 since n in base b = n-1 is 11.
a(n) > 1 for all even numbers > 4 since n in base b = n-2 is 12. Similarly, a(n) > 1 for all composite numbers > 4 since if n = k*m, then n is divisible by its product of digits in bases n-m and n-k.
a(p) > 1 for primes p in A085104.
a(p) > 2 for primes p in A119598 (i.e., 31, 8191, ...).
a(n) >= A088323(n), with equality if n = 4 or if n is a prime.

A357823 a(n) is the number of bases > 1 where n is not divisible by the sum of its digits.

Original entry on oeis.org

0, 0, 1, 0, 3, 0, 5, 1, 4, 3, 9, 1, 11, 9, 7, 5, 15, 5, 17, 7, 11, 17, 21, 5, 18, 20, 17, 14, 27, 12, 29, 16, 24, 28, 24, 13, 35, 33, 31, 17, 39, 22, 41, 33, 26, 41, 45, 18, 42, 34, 42, 38, 51, 33, 45, 35, 48, 53, 57, 26, 59, 57, 44, 41, 52, 43, 65, 56, 60, 48
Offset: 1

Views

Author

Rémy Sigrist, Oct 17 2022

Keywords

Comments

The sequence is well defined as the sum of digits of n equals n (and hence divides n) in any base > n.

Examples

			For n = 10, we have:
       b  sum of digits  divisible?
    ----  -------------  ----------
       2              2  Yes
       3              2  Yes
       4              4  No
       5              2  Yes
       6              5  Yes
       7              4  No
       8              3  No
       9              2  Yes
      10              1  Yes
    >=11             10  Yes
so a(n) = #{ 4, 7, 8 } = 3.
		

Crossrefs

Programs

  • Mathematica
    NivenQ[n_, b_] := Divisible[n, Total @ IntegerDigits[n, b]]; a[n_] := Sum[Boole @ !NivenQ[n, b], {b, 2, n}]; Array[a, 70]
  • PARI
    a(n) = sum(b=2, n, n%sumdigits(n,b)!=0)
    
  • Python
    from sympy.ntheory.factor_ import digits
    def A357823(n): return sum(1 for b in range(2,n) if n%sum(digits(n,b)[1:])) # Chai Wah Wu, Oct 19 2022

Formula

a(n) = n - A080221(n).
a(p) = p - 2 for any prime number p.

A330812 Least number >= n that is a Niven number in all bases 1 <= b <= n.

Original entry on oeis.org

1, 2, 4, 4, 6, 6, 12, 24, 24, 24, 24, 24, 24, 432, 720, 720, 720, 720, 720, 840, 840, 840, 3360, 13860, 13860, 13860, 13860, 13860, 40320, 100800, 100800, 2106720, 7698600, 9028800, 9028800, 9028800, 9028800, 9028800, 9028800, 9028800, 9028800, 9028800, 9028800
Offset: 1

Views

Author

Amiram Eldar, Jan 01 2020

Keywords

Examples

			a(4) = 4 since the representations of 4 in bases 1 to 4 are 1111, 100, 11, 10, the corresponding sums of digits are 4, 1, 2, and 1, and all are divisors of 4. Thus 4 is a Niven number in bases 1, 2, 3, and 4, and it is the least number with this property.
		

Crossrefs

Programs

  • Maple
    A[1]:= 1: m:= 1:
    for n from 2 while m < 30 do
       kk:= n;
       for k from 2 to n-1 do
         if n mod convert(convert(n,base,k),`+`) <> 0 then kk:= k-1; break fi;
         od;
       if kk > m then
         for k from m+1 to kk do A[k]:= n od;
         m:= kk;
       fi
    od:
    seq(A[k],k=1..m); # Robert Israel, Jan 01 2020
  • Mathematica
    nivenQ[n_, b_] := Divisible[n, Total @ IntegerDigits[n,b]]; a[n_] := Module[{k = n}, While[!AllTrue[Range[2, n], nivenQ[k, #] &], k++]; k]; Array[a,30]
Showing 1-8 of 8 results.