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.

Previous Showing 11-20 of 21 results. Next

A352461 Numbers k whose decimal expansion starts with the sum of digits of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 109, 119, 129, 139, 149, 159, 169, 179, 189, 199, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1009, 1018, 1027, 1036, 1045, 1054, 1063, 1072, 1081, 1090, 1109, 1118, 1127, 1136, 1145, 1154, 1163, 1172, 1181, 1190, 1209, 1218, 1227, 1236
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Mar 17 2022

Keywords

Examples

			    10 is a term because   "10" starts with  "1", which is the sum 1 + 0.
   119 is a term because  "119" starts with "11", which is the sum 1 + 1 + 9.
  1018 is a term because "1018" starts with "10", which is the sum 1 + 0 + 1 + 8.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{d = IntegerDigits[n], s, ds, nds}, s = Plus @@ d; ds = IntegerDigits[s]; nds = Length[ds]; ds == d[[1 ;; nds]]]; Select[Range[1240], q] (* Amiram Eldar, Mar 17 2022 *)
    Select[Range[1236],StringStartsQ[ToString[#],ToString[Plus@@IntegerDigits[#]]]&] (* Ivan N. Ianakiev, Mar 18 2022 *)
    Select[Range[1300],SequencePosition[IntegerDigits[#],IntegerDigits[Total[IntegerDigits[#]]]][[;;,1]]=={1}&] (* Harvey P. Dale, Nov 03 2024 *)
  • Python
    def ok(n): s = str(n); return s.startswith(str(sum(map(int, s))))
    print([k for k in range(1, 1237) if ok(k)]) # Michael S. Branicky, Mar 17 2022

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

A162016 Numbers k such that the sum of the decimal digits of k is a substring of k and of k^3.

Original entry on oeis.org

1, 4, 5, 6, 9, 10, 40, 50, 60, 90, 100, 400, 500, 600, 900, 910, 1000, 1009, 1018, 1027, 1145, 1158, 1178, 1198, 1245, 1345, 1363, 1427, 1509, 1609, 1672, 1736, 1809, 1810, 1814, 1836, 2177, 2710, 2712, 3610, 3612, 4000, 4125, 4510, 4514, 5000, 5134, 5144, 5410
Offset: 1

Views

Author

Claudio Meller, Jun 24 2009

Keywords

Examples

			1158 is a term because its digital sum is 1+1+5+8 = 15 and "15" is a substring of 1158 and of 1158^3 = 1552836312.
		

Crossrefs

Programs

  • Python
    def sd(n): return sum(map(int, str(n)))
    def ok(n): s = str(sd(n)); return s in str(n) and s in str(n**3)
    print([k for k in range(1, 5411) if ok(k)]) # Michael S. Branicky, Jan 31 2022

Extensions

a(47) and beyond from Michael S. Branicky, Jan 31 2022

A162017 Numbers k such that the sum of the decimal digits of k is a substring of k, of k^2 and of k^3.

Original entry on oeis.org

1, 5, 6, 10, 50, 60, 100, 500, 600, 910, 1000, 1009, 1018, 1027, 1145, 1810, 2710, 3610, 4510, 5000, 5410, 6000, 6310, 7210, 7212, 8110, 9010, 9100, 9925, 10000, 10009, 10018, 10027, 10036, 10045, 10054, 10063, 10072, 10081, 10090, 10108, 10117, 10126, 10135
Offset: 1

Views

Author

Claudio Meller, Jun 24 2009

Keywords

Examples

			1145 is a term because its digital sum is 1+1+4+5 = 11 and "11" is a substring of 1145, of 1145^2 = 1311025 and of 1145^3 = 1501123625.
		

Crossrefs

Programs

  • Mathematica
    sddQ[n_]:=With[{d=IntegerDigits[Total[IntegerDigits[n]]]},SequenceCount[IntegerDigits[n],d]>0&&SequenceCount[IntegerDigits[n^2],d]>0&&SequenceCount[IntegerDigits[n^3],d]>0]; Select[Range[11000],sddQ] (* Harvey P. Dale, Jun 16 2025 *)
  • Python
    def sd(n): return sum(map(int, str(n)))
    def ok(n): s = str(sd(n)); return all(s in str(t) for t in [n, n**2, n**3])
    print([k for k in range(1, 10140) if ok(k)]) # Michael S. Branicky, Jan 31 2022

Extensions

a(21) and beyond from Michael S. Branicky, Jan 31 2022

A202272 Numbers n with k digits such that each sum of 1, 2, ..., k digits of n is a substring of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 109, 200, 300, 400, 500, 600, 700, 800, 910, 1000, 1009, 1090, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 9010, 9100, 10000, 10009, 10090, 10900, 20000, 30000, 40000, 50000, 60000, 70000
Offset: 1

Views

Author

Jaroslav Krizek, Jan 06 2012

Keywords

Comments

Conjecture: sequence contains only
- numbers of the form k*10^j (j>=0, k>=0),
- numbers of the form 10X, where X = string of k digits containing one digit 9 and k-1 digits 0 (k>=1),
- numbers of form 9Y10Z; where Y = string of k digits 0 (k>=0), Z = string of j digits 0 (j>=0).
Subsequence of A052018.

Examples

			109 is a term because all possible sums of digits 0, 1, 1, 9, 9, 10 are its substrings.
		

Crossrefs

Cf. A052018 (numbers k such that the sum of the digits of k is substring of k).

A344486 a(n) is the least k such that the sum of digits of k is a substring of n and the sum of digits of n is a substring of k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 29, 39, 49, 59, 69, 79, 89, 99, 10, 2, 399, 499, 599, 699, 799, 899, 999, 101, 11, 3, 4999, 5999, 6999, 7999, 8999, 9999, 102, 111, 12, 4, 59999, 69999, 79999, 89999, 99999, 103, 112, 112, 13, 5, 699999, 799999, 899999, 999999
Offset: 0

Views

Author

Rémy Sigrist, May 21 2021

Keywords

Comments

The sequence is well defined:
- for any number n with sum of digits d,
- by necessity, d <= n,
- the number k obtained by concatenating n-d 1's in front of d meets the requirements.

Examples

			For n = 11:
- the sum of digits of 11 is 2,
- the sum of digits of a(n) must equal 1 or 11,
    - the numbers whose sum of digits is 1 are the powers of 10,
    - 2 cannot be a substring of a power of 10,
    - the first number with sum of digits 11 is 29,
    - 2 is a substring of 29,
- so a(11) = 29.
		

Crossrefs

Programs

  • Perl
    See Links section.

Formula

a(10 * n) = a(n).

A162015 Numbers n with property that the sum of the digits of n is substring of n and of n^2.

Original entry on oeis.org

1, 5, 6, 10, 50, 60, 100, 500, 600, 910, 1000, 1009, 1018, 1027, 1036, 1045, 1054, 1090, 1128, 1145, 1309, 1454, 1463, 1654, 1781, 1810, 2127, 2499, 2710, 3610, 3613, 4105, 4175, 4510, 5000, 5410, 6000, 6123, 6133, 6310, 7152, 7210, 7212, 8110, 8131, 9010
Offset: 1

Views

Author

Claudio Meller, Jun 24 2009

Keywords

Comments

1454 is in the list because its digital sum is 1+4+5+4 = 14 and "14" is a substring of 1454 and of 1454^2 = 2114116

Crossrefs

Programs

  • Mathematica
    sdssQ[n_]:=Module[{idn1=IntegerDigits[n],idn2=IntegerDigits[n^2],idnt}, idnt= IntegerDigits[ Total[idn1]];SequenceCount[idn1,idnt]>0 && SequenceCount[idn2,idnt]>0]; Select[Range[10000],sdssQ] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Jul 29 2015 *)

A384508 Nonnegative integers k such that the digits of k include the digits of the digital sum of k as a (not necessarily contiguous) subsequence.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 109, 119, 129, 139, 149, 159, 169, 179, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 300, 400, 500, 600, 700, 800, 900, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 1000
Offset: 1

Views

Author

Felix Huber, Jun 26 2025

Keywords

Examples

			196 is a term because 1 + 9 + 6 = 16 and 1, 6 is a subsequence of 1, 9, 6.
		

Crossrefs

Programs

  • Maple
    A384508:=proc(n)
        option remember;
        local k,L;	
        if n=1 then
            0
        else
            for k from procname(n-1)+1 do
                L:=convert(k,'base',10);
                if ArrayTools:-IsSubsequence(convert(add(L),'base',10),L) then
                    return k
                fi
            od
        fi;
    end proc;
    seq(A384508(n),n=1..58);

A121939 Palindromic numbers that contain the sum of their digits as a substring.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 919, 1881, 8118, 9229, 10801, 11711, 12621, 13531, 14441, 15351, 16261, 17171, 18081, 21612, 25152, 27972, 28882, 29792, 31513, 33133, 41014, 41114, 41214, 41314, 41414, 41514, 41614, 41714, 41814, 41914, 51315
Offset: 1

Views

Author

Tanya Khovanova, Sep 03 2006

Keywords

Crossrefs

Cf. Palindromic subsequence of A052018 - Sum of digits of n is substring of n.

Programs

  • Mathematica
    Select[Table[n, {n, 100000}], Length[StringPosition[ToString[ # ], ToString[Plus @@ IntegerDigits[ # ]]]] > 0 && ToString[ # ] == StringReverse[ToString[ # ]] &]

A302768 Numbers k whose sum and product of digits are substrings of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 109, 119, 200, 300, 400, 500, 600, 700, 800, 900, 910, 911, 1000, 1009, 1018, 1027, 1036, 1045, 1054, 1063, 1072, 1081, 1090, 1108, 1109, 1118, 1181, 1190, 1209, 1236, 1290, 1309, 1390, 1409, 1490
Offset: 1

Views

Author

Paolo P. Lava, Apr 13 2018

Keywords

Comments

First term greater than 9 without digit 0 is 119.
First term greater than 9 without digits 0 and 1 is 3499236.

Examples

			911 => 9 + 1 + 1 = 11 and 9 * 1 * 1 = 9;
1309 => 1 + 3 + 0 + 9 = 13 and 1 * 3 * 0 * 9 = 0;
3499236 => 3 + 4 + 9 + 9 + 2 + 3 + 6 = 36 and 3 * 4 * 9 * 9 * 2 * 3 * 6 = 34992.
		

Crossrefs

Programs

  • Maple
    select(n->searchtext(convert(convert(convert(n, base, 10), `+`),string),x.n)*searchtext(convert(convert(convert(n, base, 10), `*`),string),x.n)>0,[$1..1500]);
  • Mathematica
    Select[Range@ 1500, With[{d = IntegerDigits[#]}, AllTrue[IntegerDigits@ {Total@ d, Times @@ d}, SequenceCount[d, #] > 0 &]] &] (* Michael De Vlieger, Apr 21 2018 *)
Previous Showing 11-20 of 21 results. Next