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-2 of 2 results.

A352462 Numbers k with the property that k ends in the sum of the digits of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 4510, 4511, 4512, 4513, 4514, 4515, 4516
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Mar 17 2022

Keywords

Examples

			a(10) = 910, which ends in 10 = 9 + 1 + 0.
a(20) = 1810, which ends in 10 = 1 + 8 + 1 + 0.
a(39) = 2719, which ends in 19 = 2 + 7 + 1 + 9.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{d = IntegerDigits[n], s, ds, nds}, s = Plus @@ d; s = IntegerDigits[s]; nds = Length[ds]; ds == d[[-nds ;; -1]]]; Select[Range[4516], q] (* Amiram Eldar, Mar 17 2022 *)
    Select[Range[4516],StringEndsQ[ToString[#],ToString[Plus@@IntegerDigits[#]]]&] (* Ivan N. Ianakiev, Mar 18 2022 *)
    sdkQ[n_]:=Module[{idn=IntegerDigits[n],d},d=IntegerDigits[Total[idn]];d==Take[idn,-Length[d]]]; Select[Range[5000],sdkQ] (* Harvey P. Dale, Apr 19 2022 *)
  • Python
    def ok(n): s = str(n); return s.endswith(str(sum(map(int, s))))
    print([k for k in range(1, 4517) if ok(k)]) # Michael S. Branicky, Mar 17 2022

A352463 Numbers k with the property that the product of the digits of k starts k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 21, 31, 41, 51, 61, 71, 81, 91, 111, 126, 153, 211, 243, 311, 362, 411, 511, 611, 711, 811, 911, 1111, 1216, 1223, 1232, 1261, 1288, 1359, 1449, 1513, 1531, 1755, 2111, 2413, 2431, 3111, 3612, 3621, 3844, 4111, 5111, 6111, 6728, 7111, 7357, 8111, 9111, 11111, 11278, 11287
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Mar 17 2022

Keywords

Examples

			a(10) = 11 starts with 1, which is the product 1*1;
a(20) = 126 starts with 12, which is the product 1*2*6;
a(42) = 1755 starts with 175, which is the product ; 1*7*5*5; etc.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{d = IntegerDigits[n], p, dp, ndp}, p = Times @@ d; dp = IntegerDigits[p]; ndp = Length[dp]; dp == d[[1 ;; ndp]]]; Select[Range[12000], q] (* Amiram Eldar, Mar 18 2022 *)
  • Python
    from math import prod
    def ok(n): s = str(n); return s.startswith(str(prod(map(int, s))))
    print([k for k in range(1, 12000) if ok(k)]) # Michael S. Branicky, Mar 17 2022
Showing 1-2 of 2 results.