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.

User: John Bibby

John Bibby's wiki page.

John Bibby has authored 5 sequences.

A377228 Repdigits which are also Harshad numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 111, 222, 333, 444, 555, 666, 777, 888, 999, 111111111, 222222222, 333333333, 444444444, 555555555, 666666666, 777777777, 888888888, 999999999, 111111111111111111111111111, 222222222222222222222222222, 333333333333333333333333333, 444444444444444444444444444
Offset: 1

Author

John Bibby, Oct 20 2024

Keywords

Examples

			999 is in the sequence as it is a repdigit (all digits are equal (in base 10)) and 999 is divisible by its sum of digits; 9 + 9 + 9 = 27 is a divisors of 999. - _David A. Corneth_, Oct 20 2024
		

Crossrefs

Intersection of A005349 and A010785.
Cf. A014950.

Programs

  • Mathematica
    Select[Union[FromDigits/@Flatten[Table[PadRight[{}, i, n], {n, 9}, {i, 27}], 1]],Divisible[#,DigitSum[#]]&] (* James C. McMahon, Jan 07 2025 *)
  • PARI
    repd(n) = 10^((n+8)\9)\9*((n-1)%9+1); \\ A010785
    lista(nn) = select(x->(x%sumdigits(x)==0), vector(nn, k, repd(k))); \\ Michel Marcus, Jan 07 2025

Extensions

More terms from David A. Corneth, Oct 20 2024

A371260 a(n) is the first of three consecutive Harshad numbers in arithmetic progression.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 21, 24, 42, 110, 114, 120, 162, 192, 201, 220, 320, 330, 342, 372, 510, 511, 522, 552, 700, 774, 912, 954, 960, 1010, 1014, 1015, 1020, 1050, 1088, 1092, 1101, 1104, 1122, 1242, 1270, 1300, 1410, 1422, 1458, 1526, 1584, 1590, 1602, 1632
Offset: 1

Author

John Bibby, Mar 16 2024

Keywords

Examples

			The three consecutive Harshad numbers starting at 8 (8, 9, 10) are in arithmetic progression.
The same is true of the three consecutive Harshad numbers starting at 21 (21, 24, 27).
		

Crossrefs

Cf. A005349, A122535, A154701 (subsequence).

Programs

  • Mathematica
    Select[Partition[Select[Range[2000], Divisible[#, DigitSum[#]] &], 3, 1], Equal @@ Differences[#] &][[;;, 1]] (* Amiram Eldar, Mar 17 2024 *)
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        h1, h2, h3 = 1, 2, 3
        while True:
            if h3 - h2 == h2 - h1: yield h1
            h1, h2, h3 = h2, h3, next(k for k in count(h3+1) if k%sum(map(int, str(k))) == 0)
    print(list(islice(agen(), 52))) # Michael S. Branicky, Mar 16 2024

A347671 a(n) = n^n mod 100.

Original entry on oeis.org

1, 1, 4, 27, 56, 25, 56, 43, 16, 89, 0, 11, 56, 53, 16, 75, 16, 77, 24, 79, 0, 21, 84, 67, 76, 25, 76, 3, 36, 69, 0, 31, 76, 13, 36, 75, 36, 17, 4, 59, 0, 41, 64, 7, 96, 25, 96, 63, 56, 49, 0, 51, 96, 73, 56, 75, 56, 57, 84, 39, 0, 61, 44, 47, 16, 25, 16, 23
Offset: 0

Author

John Bibby, Sep 10 2021

Keywords

Crossrefs

Cf. A000312 (n^n), A056849 (mod 10), A174824.

Programs

  • Mathematica
    Table[PowerMod[n,n,100],{n,0,70}] (* Harvey P. Dale, Aug 13 2023 *)
  • Python
    def a(n): return pow(n, n, 100)
    print([a(n) for n in range(101)]) # Michael S. Branicky, Sep 26 2021

Formula

For n >= 101, a(n) = a(n-100), i.e., cyclic with period A174824(100) = 100, disregarding a(0). - Michael S. Branicky, Sep 26 2021

A342844 Composite numbers not divisible by any of their nonzero digits.

Original entry on oeis.org

27, 34, 38, 46, 49, 54, 56, 57, 58, 68, 69, 74, 76, 78, 86, 87, 94, 98, 203, 207, 209, 247, 249, 253, 259, 267, 289, 299, 308, 323, 329, 334, 338, 343, 346, 356, 358, 370, 374, 376, 377, 380, 386, 388, 394, 398, 403, 406, 407, 429, 430, 434, 437, 446, 447, 454
Offset: 1

Author

John Bibby, Mar 24 2021

Keywords

Crossrefs

Programs

  • Maple
    q:= n-> not isprime(n) and andmap(d-> irem(n, d)>0,
            {convert(n, base, 10)[]} minus {0}):
    select(q, [$1..500])[];  # Alois P. Heinz, Apr 01 2021
  • Mathematica
    Select[Range@500,!PrimeQ@#&&Mod[#,DeleteCases[IntegerDigits@#,0]]~FreeQ~0&] (* Giorgos Kalogeropoulos, Apr 01 2021 *)
    Select[Range[500],CompositeQ[#]&&NoneTrue[#/(IntegerDigits[#]/.(0-> Nothing)),IntegerQ]&] (* Harvey P. Dale, Dec 28 2021 *)
  • PARI
    isok(n)={if(isprime(n), 0, my(v=digits(n)); for(i=1, #v, if(v[i]<>0 && n%v[i]==0, return(0))); 1)} \\ Andrew Howroyd, Mar 25 2021
    
  • Python
    from sympy import isprime
    def ok(n): return not isprime(n) and all(n%int(d) for d in str(n) if d!='0')
    print(list(filter(ok, range(4, 455)))) # Michael S. Branicky, Apr 01 2021

A241746 Smallest number greater than n that CANNOT be scored using n darts on a standard dartboard.

Original entry on oeis.org

23, 103, 163, 223, 283, 343, 403, 463, 523, 583, 643, 703, 763, 823, 883, 943, 1003, 1063, 1123, 1183, 1243, 1303, 1363, 1423, 1483, 1543, 1603, 1663, 1723, 1783, 1843, 1903, 1963, 2023, 2083, 2143, 2203, 2263, 2323, 2383, 2443, 2503, 2563, 2623, 2683, 2743
Offset: 1

Author

John Bibby, May 18 2014

Keywords

Comments

It is assumed that each of the n darts scores. - Colin Barker, May 19 2014
Starting at a(2) = 103, each subsequent term is 60 plus the previous term. Proof: All numbers from 2 to 102 can be scored using 2 darts. For 3 darts, the possible totals are the set of sums of the numbers between 2 and 102 (the 2-dart combinations) and the values for the third dart (see A242718 for allowable scores). Since the 2-dart scores are continuous in the 2 - 102 range, any value less than 102 plus the maximum 1-dart total can be obtained by selecting the maximum 1-dart score (60) and then choosing the (desired score - 60) from the 2-dart combinations. For example, to score 95 with 3 darts, assume dart 1 scores 60 and then choose 35 from the 2-dart score list. Thus, the lowest score that cannot be obtained with 3 darts is 61 (the maximum 1-dart score + 1) + 102 (the maximum 2-dart score) = 163. Repeat this approach for subsequent terms. - David Consiglio, Jr., Jun 11 2014

Examples

			a(6) = 403. All numbers from 5 - 342 can be scored using 5 darts. Thus, 60 (dart 1) + 342 (remaining 5 darts) = 402 -> The maximum score for 6 darts. - _David Consiglio, Jr._, Jun 11 2014
		

Programs

  • Mathematica
    Join[{23},NestList[60+#&,103,60]] (* Harvey P. Dale, Sep 18 2020 *)
  • PARI
    a(n) = 103 + 60*(n-2) - 20*!(n-1); \\ Jinyuan Wang, May 30 2021

Formula

a(1) = 23, remaining terms: a(n) = 103 + 60*(n-2). - David Consiglio, Jr., Jun 11 2014
From Jianing Song, Jan 22 2021: (Start)
G.f.: 17 - 20*x + (77*x-17)/(1-x)^2.
E.g.f.: 17 - 20*x + (60*x-17)*exp(x). (End)

Extensions

a(2)-a(4) from Colin Barker, May 19 2014
a(5)-a(11) from David Consiglio, Jr., Jun 12 2014
More terms from Harvey P. Dale, Sep 18 2020