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.

A292512 Sequence A: Start with n, add the sum of digits of n (A062028) and repeat. Sequence B: Start with n, add the sum of base-100 digits of n and repeat. a(n) is the smallest common number > n.

This page as a plain text file.
%I A292512 #22 Jul 28 2025 20:47:45
%S A292512 2,4,6,8,10,12,14,16,18,221,341,24,109,218,30,1171,173,36,406,80,84,
%T A292512 88,851,96,163,104,54,218,346,120,628,1171,231,173,181,72,197,406,213,
%U A292512 538,260,237,1003,1705,90,184,719,1041,1015,365,111,320,127,117,418,488,114,1487,137,120,122,199,126,1171,298,231,134,677
%N A292512 Sequence A: Start with n, add the sum of digits of n (A062028) and repeat. Sequence B: Start with n, add the sum of base-100 digits of n and repeat.  a(n) is the smallest common number > n.
%C A292512 If you start with n=1 and take a third sequence C (n + sum of base-1000 digits of n), the first common numbers of the three sequences are 2, 4, 8, 16 and 1027975.
%C A292512 The common numbers for the first ten primes are:
%C A292512                     2 -> 4, 8, 16, 1027975, ...
%C A292512                     3 -> 24, 96, 60342, ...
%C A292512                     5 -> 10, 469534, ...
%C A292512                     7 -> 14, 131558, ...
%C A292512                    11 -> 923428, ...
%C A292512                    13 -> 668495, ...
%C A292512                    17 -> 81820, ...
%C A292512                    19 -> 2061797, ...
%C A292512                    23 -> 2227118, ...
%C A292512                    29 -> 12278, ...
%H A292512 Rémy Sigrist, <a href="/A292512/b292512.txt">Table of n, a(n) for n = 1..10000</a>
%e A292512 n=10: Sequence A: 10, 11, 13, 17, 25, 32, 37, 47, 58, 71, 79, 95, 109, 119, 130, 134, 142, 149, 163, 173, 184, 197, 214, 221, ...
%e A292512 Sequence B: 10, 20, 40, 80, 160, 221, ...
%e A292512 -> 221 is the first common number > 10, so a(n)=221.
%t A292512 With[{m = 10^3}, Table[With[{A = Rest@ NestList[# + Total@ IntegerDigits@ # &, n, m]}, NestWhile[# + Total@ IntegerDigits[#, 100] &, n, FreeQ[A, #] &, 1, m]], {n, 68}]] (* _Michael De Vlieger_, Sep 23 2017 *)
%o A292512 (PARI) a(n) = my (A=n + sumdigits(n), B=n + sumdigits(n,100)); while (1, if (A==B, return (A), A<B, A += sumdigits(A), B += sumdigits(B,100))) \\ _Rémy Sigrist_, Sep 23 2017
%Y A292512 Cf. A286660, A062028, A007618, A006507, A016096.
%K A292512 nonn,base
%O A292512 1,1
%A A292512 _Peter Weiss_, Sep 18 2017