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

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

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

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

Original entry on oeis.org

10000000000001, 10000000000003, 10000000000005, 10000000000007, 10000000000009, 10000000000011, 10000000000013, 10000000000015, 10000000000102, 10000000000104, 10000000000106, 10000000000108, 10000000000110, 10000000000112, 10000000000114, 10000000000116
Offset: 1

Views

Author

N. J. A. Sloane, Oct 12 2013 - Oct 25 2013

Keywords

Comments

Let f(n) = n + (sum of digits of n) = A062028(n).
Let g(m) = number of n such that f(n) = m (i.e. the number of inverses of m), A230093(m).
Numbers m with g(m) = 0 are called the Self or Colombian numbers, A003052.
Numbers m with g(m) = 1 give A225793.
Numbers m with g(m) = 2 give A230094.
The present sequence gives numbers m such that A230093(m) = 3.
The smallest term, a(1) = 10^13 + 1, was found by Narasinga Rao, who reports that Kaprekar verified that it is the smallest term. No details of Kaprekar's proof were given.
a(2) onwards were computed by Donovan Johnson, Oct 12 2013, and on Oct 20 2013 he completed a search of all numbers below 10^13 and verified that 10^13 + 1 is indeed the smallest term.
See A006064 for much more about this question.
Numbers m with g(m) = 4 give A377422. - Daniel Mondot, Oct 29 2024

Examples

			There are exactly three numbers, 9999999999892, 9999999999901 and 10000000000000, whose image under n->f(n) is 10000000000001, so 10^13+1 is a member of the sequence.
		

References

  • V. S. Joshi, 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, The Mathematics of the New Self Numbers, Privately printed, 311 Devlali Camp, Devlali, India, 1963.
  • Andrzej Makowski, On Kaprekar's "junction numbers", Math. Student 34 1966 77 (1967). MR0223292 (36 #6340)
  • A. Narasinga Rao, On a technique for obtaining numbers with a multiplicity of generators, Math. Student 34 1966 79--84 (1967). MR0229573 (37 #5147)

Crossrefs

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

Original entry on oeis.org

1000000000000000000000102, 1000000000000000000000104, 1000000000000000000000106, 1000000000000000000000108, 1000000000000000000000110, 1000000000000000000000112, 1000000000000000000000114, 2000000000000000000000103, 2000000000000000000000105, 2000000000000000000000107, 2000000000000000000000109
Offset: 1

Views

Author

Daniel Mondot, Oct 27 2024

Keywords

Comments

Numbers k such that A230093(k) = 0 give A003052, the Self or Colombian numbers.
Numbers k such that A230093(k) = 1 give A225793.
Numbers k such that A230093(k) = 2 give A230094.
Numbers k such that A230093(k) = 3 give A230100.
Numbers k such that A230093(k) = 4 give this sequence.

Examples

			There are exactly four numbers, 999999999999999999999894, 999999999999999999999903, 1000000000000000000000092, and 1000000000000000000000101, whose image under n->f(n) is 1000000000000000000000104, so 1000000000000000000000104 is a member of the sequence.
		

Crossrefs

Extensions

Corrected by Daniel Mondot, Apr 17 2025

A377423 Distinct values of the number of integers between consecutive self numbers (A163139), in order of occurrence.

Original entry on oeis.org

1, 10, 14, 27, 40, 53, 66, 79, 92, 105, 118, 100, 117, 130, 143, 156, 169, 182, 195, 208, 23, 89, 203, 220, 233, 246, 259, 272, 285, 298, 34, 78, 293, 306, 323, 336, 349, 362, 375, 388, 45, 67, 383, 396, 409, 426, 439, 452, 465, 478, 56, 473, 486, 499
Offset: 1

Views

Author

Daniel Mondot, Oct 27 2024

Keywords

Comments

Each new value is typically found between self numbers located around 10^k, for some k.
This sequences exhibits interesting patterns, for instance, many new numbers are 13 apart.

Examples

			Between the first 2 self numbers 1 and 3, there is 1 integer. So 1 is in the sequence
The next new gap is between 9 and 20, with 10 integers, so 10 is in the sequence.
The next new gap is between 1006 and 1021, with 14 integers, so 14 is in the sequence.
		

Crossrefs

Formula

a(n) = A377473(n)-1. - Daniel Mondot, Apr 17 2025
Showing 1-5 of 5 results.