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

A356978 a(n) is the first number k such that k^i is a quasi-Niven number (A209871) for 1<=i<=n but not for i=n+1.

Original entry on oeis.org

13, 11, 1145, 121, 31109, 1510081, 34110497, 5343853441, 17636269729
Offset: 1

Views

Author

Robert Israel, Sep 07 2022

Keywords

Comments

a(n) is the first number k such that the remainder on division of k^i by its sum of digits is 1 for 1<=i<=n but not i=n+1.

Examples

			a(4) = 121 because 121, 121^2 = 14641, 121^3 = 1771561, 121^4 = 214358881, and 121^5 = 25937424601 have sums of digits 4, 16, 28, 40, and 43 respectively, and 121 mod 4 = 1, 121^2 mod 16 = 1, 121^3 mod 28 = 1, 121^4 mod 40 = 1, but 121^4 mod 43 = 41 <> 1, and 121 is the first number that works.
		

Crossrefs

Programs

  • Maple
    sd:= n -> convert(convert(n,base,10),`+`):
    f:= proc(n) local d;
      for d from 1 do
        if n^d mod sd(n^d) <> 1 then return d-1 fi
    od
    end proc:
    V:= Vector(6): count:= 0:
    for n from 1 while count < 6 do
      v:= f(n);
    if v > 0 and V[v] = 0 then
        count:= count+1; V[v]:= n
    fi
    od:
    convert(V,list);
  • Mathematica
    quasiNivenQ[n_] := (s = Plus @@ IntegerDigits[n]) > 1 && Divisible[n - 1, s]; f[k_] := Module[{i = 0, m = k}, While[quasiNivenQ[m], m *= k; i++]; i]; seq[len_, nmax_] := Module[{s = Table[0, {len}], n = 2, c = 0, i}, While[c < len && n < nmax, i = f[n]; If[0 < i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[6, 10^7] (* Amiram Eldar, Sep 07 2022 *)

Extensions

a(7) from Amiram Eldar, Sep 07 2022
a(8) and a(9) from Giorgos Kalogeropoulos, Sep 09 2022.

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).

A341182 Numbers that when divided by the sum of their digits leave 15 as remainder.

Original entry on oeis.org

79, 287, 367, 498, 499, 593, 655, 687, 695, 697, 746, 775, 797, 875, 876, 879, 895, 899, 939, 943, 946, 1087, 1288, 1358, 1375, 1459, 1489, 1519, 1569, 1595, 1599, 1663, 1664, 1687, 1695, 1758, 1775, 1807, 1817, 1884, 1885, 1887, 1947, 1951, 1955, 1959, 1970, 1972
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 06 2021

Keywords

Examples

			a(1) = 79 and 79 is 16*4 with remainder 15;
a(2) = 287 and 287 is 17*16 with remainder 15; etc.
		

Crossrefs

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

Programs

  • Mathematica
    Select[Range[2000],Mod[#,Total[IntegerDigits[#]]]==15&] (* Harvey P. Dale, Sep 03 2021 *)

A347702 Prime numbers that give a remainder of 1 when divided by the sum of their digits.

Original entry on oeis.org

11, 13, 17, 41, 43, 97, 101, 131, 157, 181, 233, 239, 271, 311, 353, 401, 421, 491, 521, 541, 599, 617, 631, 647, 673, 743, 811, 859, 953, 1021, 1031, 1051, 1093, 1171, 1201, 1249, 1259, 1301, 1303, 1327, 1373, 1531, 1601, 1621, 1801, 1871, 2029, 2111, 2129, 2161
Offset: 1

Views

Author

Burak Muslu, Sep 10 2021

Keywords

Examples

			97 is a term since its sum of digits is 9+7 = 16, and 97 mod 16 = 1.
		

Crossrefs

Subsequence of A209871.
A259866 \ {31}, and the primes associated with A056804 \ {1, 2} and A056797 are subsequences.

Programs

  • Maple
    select(t -> isprime(t) and t mod convert(convert(t,base,10),`+`) = 1, [seq(i,i=3..10000,2)]); # Robert Israel, Mar 05 2024
  • Mathematica
    Select[Range[2000], PrimeQ[#] && Mod[#, Plus @@ IntegerDigits[#]] == 1 &] (* Amiram Eldar, Sep 10 2021 *)
  • PARI
    isok(p) = isprime(p) && ((p % sumdigits(p)) == 1); \\ Michel Marcus, Sep 10 2021
  • Python
    from sympy import primerange
    def ok(p): return p%sum(map(int, str(p))) == 1
    print(list(filter(ok, primerange(1, 2130)))) # Michael S. Branicky, Sep 10 2021
    

A356947 Emirps p such that p == 1 (mod s) and R(p) == 1 (mod s), where R(p) is the digit reversal of p and s the sum of digits of p.

Original entry on oeis.org

1021, 1031, 1201, 1259, 1301, 9521, 10253, 10711, 11071, 11161, 11243, 11701, 12113, 12241, 14221, 15907, 16111, 16481, 17011, 17491, 18461, 19471, 30757, 31121, 34211, 35201, 70951, 71347, 71569, 72337, 73327, 74317, 75703, 96517, 100621, 101611, 101701, 102061, 102913, 103141, 105211, 106661
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Sep 05 2022

Keywords

Comments

Emirps p such that p and its digit reversal are quasi-Niven numbers.

Examples

			a(3) = 1201 is a term because it and its digit reversal 1021 are distinct primes with sum of digits 4, and 1201 == 1021 == 1 (mod 4).
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,i,r,s;
      if not isprime(n) then return false fi;
      L:= convert(n,base,10);
      r:= add(L[-i]*10^(i-1),i=1..nops(L));
      if r = n or not isprime(r) then return false fi;
      s:= convert(L,`+`);
      n mod s = 1 and r mod s = 1
    end proc:
    select(filter, [seq(i,i=13 .. 200000, 2)]);
  • Mathematica
    Select[Range[110000], (r = IntegerReverse[#]) != # && PrimeQ[#] && PrimeQ[r] && Divisible[# - 1, (s = Plus @@ IntegerDigits[#])] && Divisible[r - 1, s] &] (* Amiram Eldar, Sep 06 2022 *)
  • Python
    from sympy import isprime
    def ok(n):
        strn = str(n)
        R, s = int(strn[::-1]), sum(map(int, strn))
        return n != R and n%s == 1 and R%s == 1 and isprime(n) and isprime(R)
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Sep 06 2022

A341170 Numbers that when divided by the sum of their digits leave 3 as remainder.

Original entry on oeis.org

15, 23, 31, 33, 35, 39, 47, 51, 52, 59, 73, 75, 78, 94, 103, 105, 107, 113, 115, 123, 141, 146, 147, 163, 168, 183, 185, 203, 211, 213, 219, 231, 241, 245, 251, 253, 255, 258, 259, 291, 303, 304, 321, 323, 327, 328, 343, 344, 348, 363, 377, 393, 411, 430, 433, 435, 437, 438, 443, 445
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 06 2021

Keywords

Examples

			a(1) = 15 and 15 is 6*2 with remainder 3;
a(2) = 23 and 23 is 5*4 with remainder 3; etc.
		

Crossrefs

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

Programs

  • Mathematica
    Select[Range[500],Mod[#,Total[IntegerDigits[#]]]==3&] (* Harvey P. Dale, May 27 2021 *)

A341171 Numbers that when divided by the sum of their digits leave 4 as remainder.

Original entry on oeis.org

14, 25, 44, 64, 89, 92, 104, 116, 151, 154, 158, 191, 196, 214, 238, 244, 260, 284, 289, 290, 332, 334, 340, 355, 395, 403, 404, 424, 472, 484, 514, 536, 548, 598, 604, 620, 628, 662, 706, 772, 796, 823, 854, 878, 884, 914, 916, 940, 973, 979, 994, 1004, 1033, 1052, 1054, 1057
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 06 2021

Keywords

Examples

			a(1) = 14 and 14 is 5*2 with remainder 4;
a(2) = 25 and 25 is 7*3 with remainder 4; etc.
		

Crossrefs

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

A341172 Numbers that when divided by the sum of their digits leave 5 as remainder.

Original entry on oeis.org

38, 53, 55, 61, 124, 125, 137, 145, 148, 235, 236, 250, 257, 265, 277, 313, 325, 335, 341, 382, 383, 413, 415, 434, 502, 505, 509, 533, 565, 566, 616, 632, 635, 701, 709, 719, 731, 733, 761, 784, 785, 830, 850, 853, 872, 955, 965, 1006, 1028, 1045, 1061, 1084
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 06 2021

Keywords

Examples

			a(1) = 38 and 38 is 11*3 with remainder 5;
a(2) = 53 and 53 is 8*6 with remainder 5; etc.
		

Crossrefs

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

A341173 Numbers that when divided by the sum of their digits leave 6 as remainder.

Original entry on oeis.org

34, 46, 58, 62, 66, 83, 96, 134, 136, 138, 160, 174, 175, 182, 186, 206, 223, 226, 246, 276, 278, 281, 282, 292, 316, 318, 350, 354, 356, 358, 366, 380, 390, 406, 409, 412, 422, 426, 456, 462, 482, 489, 526, 534, 546, 570, 584, 591, 595, 601, 606, 608, 636, 642, 643, 646, 678, 681, 686, 688
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 06 2021

Keywords

Examples

			a(1) = 34 and 34 is 7*4 with remainder 6;
a(2) = 46 and 46 is 10*4 with remainder 6; etc.
		

Crossrefs

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

Programs

  • PARI
    isok(n) = n%sumdigits(n) == 6; \\ Michel Marcus, Feb 06 2021

A341174 Numbers that when divided by the sum of their digits leave 7 as remainder.

Original entry on oeis.org

29, 37, 71, 77, 85, 127, 128, 143, 215, 217, 227, 295, 296, 307, 319, 326, 329, 425, 431, 436, 439, 449, 455, 503, 524, 553, 577, 581, 583, 587, 623, 670, 707, 722, 727, 748, 755, 767, 821, 833, 871, 904, 908, 919, 920, 947, 1007, 1019, 1027, 1085, 1117, 1118, 1138, 1151, 1159
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 06 2021

Keywords

Examples

			a(1) = 29 and 29 is 11*2 with remainder 7;
a(2) = 37 and 37 is 10*3 with remainder 7; etc.
		

Crossrefs

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

Programs

  • PARI
    isok(n) = n%sumdigits(n) == 7; \\ Michel Marcus, Feb 06 2021
Showing 1-10 of 23 results. Next