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

A358512 a(n) is the smallest number k with exactly n divisors that can be written in the form m + digsum(m), for some m (A176995).

Original entry on oeis.org

1, 2, 4, 8, 12, 30, 24, 80, 48, 72, 96, 192, 120, 180, 288, 612, 240, 624, 420, 360, 480, 900, 1632, 960, 1200, 720, 840, 1560, 2100, 1260, 1440, 3420, 2640, 3024, 1680, 2880, 8316, 4620, 3600, 3780, 4200, 2520, 3360, 6240, 9900, 6300, 7200, 8640, 6720, 13200, 7920
Offset: 0

Views

Author

Marius A. Burtea, Dec 04 2022

Keywords

Examples

			1 cannot be written in the form m + digsum(m), so a(0) = 1.
2 has divisors 1 and 2, and only 2 is written 2 = 1 + digsum(1), so a(1) = 2.
3 has divisors 1 and 3 that cannot be written in the form m + digsum(m).
4 has divisors 1, 2, 4, but only 2 = 1 + digsum(1) and 4 = 2 + digsum(2), so a(2) = 4.
		

Crossrefs

Programs

  • Magma
    f:=func; a:=[]; for n in [0..50] do k:=1; while #[d:d in Divisors(k)|f(d)] ne n do k:=k+1; end while; Append(~a,k); end for; a;
    
  • PARI
    is_A003052(n)={for(i=1, min(n\2, 9*#digits(n)), sumdigits(n-i)==i && return); n}
    a(n) = my(k=1); while (sumdiv(k, d, !is_A003052(d)) != n, k++); k; \\ Michel Marcus, Dec 13 2022

A003052 Self numbers or Colombian numbers (numbers that are not of the form m + sum of digits of m for any m).

Original entry on oeis.org

1, 3, 5, 7, 9, 20, 31, 42, 53, 64, 75, 86, 97, 108, 110, 121, 132, 143, 154, 165, 176, 187, 198, 209, 211, 222, 233, 244, 255, 266, 277, 288, 299, 310, 312, 323, 334, 345, 356, 367, 378, 389, 400, 411, 413, 424, 435, 446, 457, 468, 479, 490, 501, 512, 514, 525
Offset: 1

Views

Author

Keywords

Comments

From Amiram Eldar, Nov 28 2020: (Start)
The term "self numbers" was coined by Kaprekar (1959). The term "Colombian number" was coined by Recamán (1973) of Bogota, Colombia.
The asymptotic density of this sequence is approximately 0.0977778 (Guaraldo, 1978). (End)

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.24.
  • Martin Gardner, Time Travel and Other Mathematical Bewilderments. Freeman, NY, 1988, p. 116.
  • V. S. Joshi, A note on self-numbers. Volume dedicated to the memory of V. Ramaswami Aiyar. Math. Student, Vol. 39 (1971), pp. 327-328. MR0330032 (48 #8371).
  • D. R. Kaprekar, Puzzles of the Self-Numbers. 311 Devlali Camp, Devlali, India, 1959.
  • D. R. Kaprekar, The Mathematics of the New Self Numbers, Privately Printed, 311 Devlali Camp, Devlali, India, 1963.
  • D. R. Kaprekar, The Mathematics of the New Self Numbers (Part V). 311 Devlali Camp, Devlali, India, 1967.
  • Bernardo Recamán, The Bogota Puzzles, Dover Publications, Inc., 2020, chapter 36, p. 33.
  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, pp. 384-386.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Author?, J. Recreational Math., vol. 23, no. 1, p. 244, 1991.

Crossrefs

For self primes, i.e., self numbers which are primes, see A006378.
Complement of A176995.
See A010061 for the binary version, A283002 for a base-100 version.
Cf. A247104 (subsequence of squarefree terms).
Cf. A377472 for first differences, A377474 for indices where new differences appear.

Programs

  • Haskell
    a003052 n = a003052_list !! (n-1)
    a003052_list = filter ((== 0) . a230093) [1..]
    -- Reinhard Zumkeller, Oct 11 2013, Aug 21 2011
  • Maple
    isA003052 := proc(n) local k ; for k from 0 to n do if k+A007953(k) = n then RETURN(false): fi; od: RETURN(true) ; end:
    A003052 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do if isA003052(a) then RETURN(a) ; fi; od; fi; end: # R. J. Mathar, Jul 27 2009
  • Mathematica
    nn = 525; Complement[Range[nn], Union[Table[n + Total[IntegerDigits[n]], {n, nn}]]] (* T. D. Noe, Mar 31 2013 *)
  • PARI
    is_A003052(n)={for(i=1,min(n\2,9*#digits(n)), sumdigits(n-i)==i && return); n}  \\ M. F. Hasler, Mar 20 2011, updated Nov 08 2018
    
  • PARI
    is(n) = {if(n < 30, return((n < 10 && n%2 == 1) || n == 20)); qd = 1 + logint(n, 10); r = 1 + (n-1)%9; h = (r + 9 * (r%2))/2; ld = 10; while(h + 9*qd >= n % ld, ld*=10); vs = vecsum(digits(n \ ld)); n %= ld; for(i = 0, qd, if(vs + vecsum(digits(n - h - 9*i)) == h + 9*i, return(0))); 1} \\ David A. Corneth, Aug 20 2020
    

Formula

A230093(a(n)) = 0. - Reinhard Zumkeller, Oct 11 2013
In fact this defines the sequence: x is in the sequence iff A230093(x) = 0. - M. F. Hasler, Nov 08 2018

Extensions

More terms from James Sellers, Jul 06 2000

A062028 a(n) = n + sum of the digits of n.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 77
Offset: 0

Views

Author

Amarnath Murthy, Jun 02 2001

Keywords

Comments

a(n) = A248110(n,A007953(n)). - Reinhard Zumkeller, Oct 01 2014

Examples

			a(34) = 34 + 3 + 4 = 41, a(40) = 40 + 4 = 44.
		

Crossrefs

Indices of: A047791 (primes), A107743 (composites), A066564 (squares), A084661 (cubes).
Iterations: A004207 (start=1), A016052 (start=3), A007618 (start=5), A006507 (start=7), A016096 (start=9).

Programs

  • Haskell
    a062028 n = a007953 n + n  -- Reinhard Zumkeller, Oct 11 2013
    
  • Maple
    with(numtheory): for n from 1 to 100 do a := convert(n,base,10):
    c := add(a[i],i=1..nops(a)): printf(`%d,`,n+c); od:
    A062028 := n -> n+add(i,i=convert(n,base,10)) # M. F. Hasler, Nov 08 2018
  • Mathematica
    Table[n + Total[IntegerDigits[n]], {n, 0, 100}]
  • PARI
    A062028(n)=n+sumdigits(n) \\ M. F. Hasler, Jul 19 2015
    
  • Python
    def a(n): return n + sum(map(int, str(n)))
    print([a(n) for n in range(71)]) # Michael S. Branicky, Jan 09 2023

Formula

a(n) = n + A007953(n).
a(n) = A160939(n+1) - 1. - Filip Zaludek, Oct 26 2016

Extensions

More terms from Vladeta Jovovic, Jun 05 2001

A230093 Number of values of k such that k + (sum of digits of k) is n.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1
Offset: 0

Views

Author

N. J. A. Sloane, Oct 10 2013

Keywords

Comments

a(n) is the number of times n occurs in A062028.
For n>=1, a(10^n) = a(9*n-1). - Max Alekseyev, Feb 23 2021

Crossrefs

Cf. A006064, A007953 (sum of digits), A062028 (n + sum of its digits), A004207, A228085, A003052, A176995, A225793, A230094, A055642.
Cf. A107740 (this applied to primes).

Programs

  • Haskell
    a230093 n = length $ filter ((== n) . a062028) [n - 9 * a055642 n .. n]  -- Reinhard Zumkeller, Oct 11 2013
    
  • Maple
    # Maple code for A062028, A230093, A003052, A225793, A230094.
    with(LinearAlgebra):
    read transforms; # to get digsum
    M := 1000; A062028 := Array(0..M); A230093 := Array(0..M);
    for n from 0 to M do
       m := n+digsum(n);
       A062028[n] := m;
       if m <= M then A230093[m] := A230093[m]+1; fi;
    od:
    t1:=[seq(A062028[i],i=0..M)]; # A062028 as list (but incorrect offset 1)
    t2:=[seq(A230093[i],i=0..M)]; # A230093 as list, but then a(0) has index 1
    # A003052 := COMPl(t1); # COMPl has issues, may be incorrect for M <> 1000
    ctmax:=4;
    for h from 0 to ctmax do ct[h] := []; od:
    for i from 1 to M do
       h := lis2[i];
       if h <= ctmax then ct[h] := [op(ct[h]),i]; fi;
    od:
    A225793 := ct[1]; A230094 := ct[2]; # A003052 := ct[0]; # see there for better code
  • Mathematica
    Module[{nn=110,a,b,c,d},a=Tally[Table[x+Total[IntegerDigits[x]],{x,0,nn}]];b=a[[All,1]];c={#,0}&/@Complement[Range[nn],b];d=Sort[Join[a,c]];d[[All, 2]]] (* Harvey P. Dale, Jun 12 2019 *)
  • PARI
    apply( A230093(n)=sum(i=n>0,min(9*logint(n+!n,10)+8,n\2),sumdigits(n-i)==i), [1..150]) \\ M. F. Hasler, Nov 08 2018

Extensions

Edited by M. F. Hasler, Nov 08 2018

A230099 a(n) = n + (product of digits of n).

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 50, 56, 62, 68, 74, 80, 86, 92, 98, 104, 60, 67, 74, 81, 88, 95, 102, 109, 116, 123, 70, 78, 86, 94, 102, 110, 118, 126
Offset: 0

Views

Author

N. J. A. Sloane, Oct 12 2013

Keywords

Comments

A230099, A063114, A098736, A230101 are analogs of A092391 and A062028.

Crossrefs

Programs

  • Haskell
    a230099 n = a007954 n + n  -- Reinhard Zumkeller, Oct 13 2013
    
  • Maple
    with transforms; [seq(n+digprod(n), n=0..200)];
  • PARI
    a(n) = if (n, n + vecprod(digits(n)), 0); \\ Michel Marcus, Dec 18 2018
    
  • Python
    from math import prod
    def a(n): return n + prod(map(int, str(n)))
    print([a(n) for n in range(78)]) # Michael S. Branicky, Jan 09 2023

Formula

a(n) = n iff n contains a digit 0 (A011540). - Bernard Schott, Jul 31 2023

A230094 Numbers that can be expressed as (m + sum of digits of m) in exactly two ways.

Original entry on oeis.org

101, 103, 105, 107, 109, 111, 113, 115, 117, 202, 204, 206, 208, 210, 212, 214, 216, 218, 303, 305, 307, 309, 311, 313, 315, 317, 319, 404, 406, 408, 410, 412, 414, 416, 418, 420, 505, 507, 509, 511, 513, 515, 517, 519, 521, 606, 608, 610, 612, 614, 616, 618, 620, 622, 707, 709, 711, 713, 715, 717, 719, 721, 723, 808
Offset: 1

Views

Author

N. J. A. Sloane, Oct 10 2013, Oct 24 2013

Keywords

Comments

Numbers n such that A230093(n) = 2.
The sequence "Numbers n such that A230093(n) = 3" starts at 10^13+1 (see A230092). This implies that changing the definition of A230094 to "Numbers n such that A230093(n) >= 2" (the so-called "junction numbers") would produce a sequence which agrees with A230094 up to 10^13.
Makowski shows that the sequence of junction numbers is infinite.

Examples

			a(1) = 101 = 91 + (9+1) = 100 + (1+0+0);
a(10) = 202 = 191 + (1+9+1) = 200 + (2+0+0);
a(100) = 1106 = 1093 + (1+0+9+3) = 1102 + (1+1+0+2);
a(1000) = 10312 = 10295 + (1+0+2+9+5) = 10304 + (1+0+3+0+4).
		

References

  • Joshi, V. S. A note on self-numbers. Volume dedicated to the memory of V. Ramaswami Aiyar. Math. Student 39 (1971), 327--328 (1972). MR0330032 (48 #8371)
  • D. R. Kaprekar, Puzzles of the Self-Numbers. 311 Devlali Camp, Devlali, India, 1959.
  • D. R. Kaprekar, The Mathematics of the New Self Numbers, Privately Printed, 311 Devlali Camp, Devlali, India, 1963.
  • Makowski, Andrzej. On Kaprekar's "junction numbers''. Math. Student 34 1966 77 (1967). MR0223292 (36 #6340)
  • Narasinga Rao, A. On a technique for obtaining numbers with a multiplicity of generators. Math. Student 34 1966 79--84 (1967). MR0229573 (37 #5147)

Crossrefs

Programs

  • Haskell
    a230094 n = a230094_list !! (n-1)
    a230094_list = filter ((== 2) . a230093) [0..]
    -- Reinhard Zumkeller, Oct 11 2013
  • Maple
    For Maple code see A230093.
  • Mathematica
    Position[#, 2][[All, 1]] - 1 &@ Sort[Join[#2, Map[{#, 0} &, Complement[Range[#1], #2[[All, 1]]]] ] ][[All, -1]] & @@ {#, Tally@ Array[# + Total@ IntegerDigits@ # &, # + 1, 0]} &[10^3] (* Michael De Vlieger, Oct 28 2020, after Harvey P. Dale at A230093 *)

A225793 Numbers n that can be uniquely expressed as (m + sum of digits of m) for some m.

Original entry on oeis.org

2, 4, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77
Offset: 1

Views

Author

Jayanta Basu, Jul 27 2013

Keywords

Comments

Subset of A176995; first member in A176995 that is not here is 101, next is 103 (cf. A230094).
A230093(a(n)) = 1. - Reinhard Zumkeller, Oct 11 2013

Examples

			100 is a member as 100 = 86 + sum of digits of (86). 101 is not a member since both 91 and 100 generate 101. Again 103 is not a member as 92 and 101 generate 103.
		

References

  • Joshi, V. S. A note on self-numbers. Volume dedicated to the memory of V. Ramaswami Aiyar. Math. Student 39 (1971), 327--328 (1972). MR0330032 (48 #8371)
  • Makowski, Andrzej. On Kaprekar's "junction numbers''. Math. Student 34 1966 77 (1967). MR0223292 (36 #6340)
  • Narasinga Rao, A. On a technique for obtaining numbers with a multiplicity of generators. Math. Student 34 1966 79--84 (1967). MR0229573 (37 #5147)

Crossrefs

Programs

  • Haskell
    a225793 n = a225793_list !! (n-1)
    a225793_list = filter ((== 1) . a230093) [1..]
    -- Reinhard Zumkeller, Oct 11 2013
  • Maple
    For Maple code see A230093. - N. J. A. Sloane, Oct 11 2013
  • Mathematica
    co[n_] := Count[Range[n - 1], _?(# + Total[IntegerDigits[#]] == n &)]; Select[Range[100], co[#] == 1 &]
    Select[Tally[Table[m+Total[IntegerDigits[m]],{m,100}]],#[[2]]==1&][[All, 1]]// Sort (* Harvey P. Dale, Aug 23 2017 *)

A337718 Numbers that can be written as (m + product of digits of m) for some m.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 23, 24, 26, 28, 29, 30, 32, 34, 35, 38, 40, 41, 42, 44, 45, 46, 47, 50, 54, 55, 56, 58, 60, 62, 65, 66, 67, 68, 70, 74, 75, 78, 80, 81, 85, 86, 88, 89, 90, 92, 94, 95, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109
Offset: 1

Views

Author

Bernard Schott, Sep 16 2020

Keywords

Comments

Every integer that contains a digit 0 is a term (A011540).
When R_m with m >= 1 is in A002275, then R_m + 1 is a term (A047855 \ {1}).
Near similar:
-> Not-Colombian (A176995) are numbers that can be written as (m + sum of digits of m) for some m.
-> Bogotá numbers (A336826) are numbers that can be written as (m * product of digits of m) for some m.

Examples

			10 = 5 + 5 = 10 + (1*0) and 22 = 16 + (1*6) are terms.
		

Crossrefs

Subsequences: A011540, A047855 \ {1}.
Range of A230099.
Cf. A176995 (not Colombian), A336826 (Bogotá numbers).

Programs

  • Mathematica
    m = 100; Select[Union[Table[n + Times @@ IntegerDigits[n], {n, 0, m}]], # <= m &] (* Amiram Eldar, Sep 16 2020 *)
  • PARI
    isok(m) = {if (m==0, return (1)); for (k=1, m,  if (k+vecprod(digits(k)) == m, return (1)););} \\ Michel Marcus, Sep 17 2020
    
  • Python
    from math import prod
    def b(n): return n + prod(map(int, str(n)))
    def aupto(n): return sorted(set(b(m) for m in range(n+1) if b(m) <= n))
    print(aupto(109)) # Michael S. Branicky, Jan 09 2023

A336983 Bogota numbers that are not Colombian numbers.

Original entry on oeis.org

4, 11, 16, 24, 25, 36, 39, 49, 56, 81, 88, 93, 96, 111, 119, 138, 144, 164, 171, 192, 224, 242, 250, 297, 336, 339, 366, 393, 408, 422, 448, 456, 488, 497, 516, 520, 522, 564, 575, 696, 704, 744, 755, 777, 792, 795, 819, 848, 884, 900, 912, 933, 944, 966, 992
Offset: 1

Views

Author

Bernard Schott, Aug 10 2020

Keywords

Comments

Equivalently, numbers m that are of the form k + sum of digits of k for some k (A176995), and also of the form q * product of digits of q for some q (A336826).
Repunits are trivially Bogota numbers but the indices m of the repunits R_m that are not Colombian numbers are in A337139; also, all known repunit primes are terms (A004023) [see examples for primes R_2, R_19 and R_23].
35424 is the smallest term that belongs to both A230094 and A336944 (see last example).

Examples

			R_2 = 11 = 10 + (1+0) = 11 * (1*1) is a term;
24 = 21 + (2+1) = 12 * (1*2) is a term;
39 = 33 + (3+3) = 13 * (1*3) is a term;
R_19 = 1111111111111111079 + (16*1+7+9) = 1111111111111111111 * (1^19) hence R_19 is a term;
R_23 = 11111111111111111111077 + (20*1+7+7) = 11111111111111111111111 * (1^23) hence R_23 is a term;
42 = 21 * (2*1) is a Bogota number but there does not exist m < 42 such that 42 = m + sum of digits of m, hence 42 that is also a Colombian number is not a term.
35424 = 35406 + (3+5+4+0+6) = 35397 + (3+5+3+9+7) = 2214 * (2*2*1*4) = 492 * (4*9*2).
		

Crossrefs

Intersection of A176995 and A336826.
Cf. A003052 (Colombian), A336984 (Bogota and Colombian), A336985 (Colombian not Bogota), A336986 (not Colombian and not Bogota).

Programs

  • Mathematica
    m = 1000; Intersection[Select[Union[Table[n + Plus @@ IntegerDigits[n], {n, 1, m}]], # <= m &], Select[Union[Table[n * Times @@ IntegerDigits[n], {n, 1, m}]], # <= m &]] (* Amiram Eldar, Aug 10 2020 *)
  • PARI
    lista(nn) = Vec(setintersect(Set(vector(nn, k, k+sumdigits(k))), Set(vector(nn, k, k*vecprod(digits(k)))))); \\ Michel Marcus, Aug 20 2020

A358350 Numbers that can be written as (m + sum of digits of m + product of digits of m) for some m.

Original entry on oeis.org

3, 6, 9, 11, 12, 14, 15, 17, 18, 20, 21, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 35, 38, 42, 43, 44, 46, 48, 50, 53, 54, 55, 56, 58, 62, 63, 66, 68, 69, 73, 74, 76, 77, 78, 80, 82, 83, 86, 88, 90, 92, 95, 97, 98, 99, 101, 103, 104, 105, 106, 107, 108, 109, 110
Offset: 1

Views

Author

Bernard Schott, Nov 11 2022

Keywords

Comments

Integers that are in A161351.
(i) Can arbitrarily long sets of consecutive integers be found in this sequence?
(ii) Is the gap between two consecutive terms bounded?
A000533 \ {1} is a subsequence.
This has the same asymptotic density, approximately 0.9022222, as A176995, since the asymptotic density of non-pandigital numbers is 0. - Charles R Greathouse IV, Nov 16 2022

Examples

			A161351(23) = 23 + (2+3) + (2*3) = 34 so 34 is a term.
There is no integer du_10 such that du + (d+u) + (d*u) = 31, so 31 is not a term.
		

Crossrefs

Range of A161351.
Similar: A176995 (m+digitsum), A336826 (m*digitprod), A337718 (m+digitprod).
Cf. A000533.

Programs

  • Mathematica
    f[n_] := n + Total[(d = IntegerDigits[n])] + Times @@ d; With[{m = 110}, Select[Union[Table[f[n], {n, 1, m}]], # <= m &]] (* Amiram Eldar, Nov 11 2022 *)
  • PARI
    f(n) = my(d=digits(n)); n + vecsum(d) + vecprod(d); \\ A161351
    lista(nn) = select(x->(x<=nn), Set(vector(nn, k, f(k)))); \\ Michel Marcus, Nov 12 2022
    
  • Python
    from math import prod
    def sp(n): d = list(map(int, str(n))); return sum(d) + prod(d)
    def ok(n): return any(m + sp(m) == n for m in range(n))
    print([k for k in range(111) if ok(k)]) # Michael S. Branicky, Dec 19 2022

Formula

a(n) ~ kn with k approximately 1.108374, see comments. - Charles R Greathouse IV, Nov 16 2022
Showing 1-10 of 21 results. Next