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.

A263534 Consider the 10's complements mod 10 of the digits of a number k. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some iterations reach a sum equal to k.

Original entry on oeis.org

29, 76, 157, 174, 191, 475, 713, 1129, 1961, 3286, 4424, 7812, 8973, 19978, 24317, 35845, 37041, 51712, 68022, 166838, 443275, 444247, 445219, 509439, 706317, 1189312, 1933197, 2686010, 10809303, 55558901, 58338037, 257990335, 504050156, 839186880
Offset: 1

Views

Author

Paolo P. Lava, Oct 20 2015

Keywords

Comments

Like Keith numbers but using the ten's complements of their digits.
a(35) > 10^9. - Robert Price, Apr 08 2019

Examples

			For 29, the 10's complements of its digits are 8, 1. Then:
  8 + 1 = 9;
  1 + 9 = 10;
  9 + 10 = 19;
  10 + 19 = 29.
For 475, the 10's complements of its digits are 6, 3, 5. Then:
  6 + 3 + 5 = 14;
  3 + 5 + 14 = 22;
  5 + 14 + 22 = 41;
  14 + 22 + 41 = 77;
  22 + 41 + 77 = 140;
  41 + 77 + 140 = 258;
  77 + 140 + 258 = 475.
		

Crossrefs

Cf. A007629.

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,c,k,n,t,v; v:=array(1..h);
    for n from 10 to q do b:=ilog10(n)+1; c:=n; a:=[];
    for k from 1 to b do a:=[(10-c) mod 10,op(a)]; c:=trunc(c/10); od;
    for k from 1 to b do v[k]:=a[k]; od; t:=b+1; v[t]:=add(v[k], k=1..b);
    while v[t]
    				
  • Mathematica
    Select[Range[10^5], Function[{m, n}, Last@ NestWhile[Append[#, Total@ Take[#, -m]] &, Flatten[{#, Total@ #}] &[IntegerDigits[n] /. d_?Positive :> 10 - d], Last@ # < n &, 1, 10^2] == n] @@ {IntegerLength@#, #} &] (* Michael De Vlieger, Mar 09 2018 *)

Extensions

Name clarified, some terms and Maple code corrected by Paolo P. Lava, Mar 08 2018
a(30)-a(32) from Robert Price, Apr 05 2019
a(33)-a(34) from Robert Price, Apr 08 2019