A007629
Repfigit (REPetitive FIbonacci-like diGIT) numbers (or Keith numbers).
Original entry on oeis.org
14, 19, 28, 47, 61, 75, 197, 742, 1104, 1537, 2208, 2580, 3684, 4788, 7385, 7647, 7909, 31331, 34285, 34348, 55604, 62662, 86935, 93993, 120284, 129106, 147640, 156146, 174680, 183186, 298320, 355419, 694280, 925993, 1084051, 7913837, 11436171, 33445755, 44121607
Offset: 1
197 is a term since sequence {b(i)} (see Comments) is A186830 = { 1, 9, 7, 17, 33, 57, 107, 197, ... }, which contains 197.
- Charles Ashbacher, J. Rec. Math., Vol. 21, No. 4 (1989), p. 310.
- Jean-Marie De Koninck, Ces nombres qui nous fascinent, Entry 197, p. 59, Ellipses, Paris 2008.
- Mike Keith, Repfigit Numbers, J. Recreational Math., Vol. 19, No. 2 (1987), pp. 41-42.
- Clifford A. Pickover, All Known Replicating Fibonacci Digits Less Than One Billion, J. Recreational Math., Vol. 22, No. 3, p. 176, 1990.
- Clifford A. Pickover, Computers and the Imagination, St. Martin's Press, NY, 1991, p. 229.
- Clifford A. Pickover, Wonders of Numbers, "Looping Replicating Fibonacci digits", pp. 174-5, OUP 2000.
- K. Sherriff, Computing Replicating Fibonacci Digits, J. Recreational Math., Vol. 26, No. 3, p. 191, 1994.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- David Wells, The Penguin Dictionary of Curious and Interesting Numbers, see p. 71.
- N. J. A. Sloane, Table of n, a(n) for n = 1..94 [Taken from first Keith link below.]
- Rüdeger Baumann, Sep-Zahlen or Sep-Numbers, DERIVE Newsletter, #53 (2004), p. 33.
- Jhon J. Bravo, Sergio Guzmán, and Florian Luca, Repdigit Keith numbers, Lithuanian Mathematical Journal, Vol. 53, No. 2 (April 2013), pp. 143-148.
- Edmund Copeland and Brady Haran, Keith Numbers, Numberphile video (2012).
- Mike Keith, Keith numbers.
- Mike Keith, Determination of All Keith Numbers Up to 10^19.
- Mike Keith, Power-sum numbers, J. Recreational Mathematics, Vol. 18, No. 4 (1986), pp. 275-278. (Annotated scanned copy)
- Martin Klazar and Florian Luca, Counting Keith numbers, Journal of Integer Sequences, Vol. 10 (2007), Article 07.2.2.
- Madras Math's Amazing Number Facts, Repfigits.
- Clifford A. Pickover, "Wonders of Numbers, Adventures in Mathematics, Mind and Meaning," Zentralblatt review.
- Eric Weisstein's World of Mathematics, Keith Number.
- Wikipedia, Keith number.
Cf.
A188201 (least base-n Keith number >= n).
-
import Data.Char (digitToInt)
a007629 n = a007629_list !! (n-1)
a007629_list = filter isKeith [10..] where
isKeith n = repfigit $ reverse $ map digitToInt $ show n where
repfigit ns = s == n || s < n && (repfigit $ s : init ns) where
s = sum ns
-- Reinhard Zumkeller, Nov 04 2010, Mar 31 2011
-
isA007629 := proc(n)
local L,t,a ;
if n < 10 then
return false;
end if;
L := ListTools[Reverse](convert(n,base,10)) ;
t := nops(L) ;
while true do
a := add(op(-i,L),i=1..t) ;
L := [op(L),a] ;
if a > n then
return false;
elif a = n then
return true;
end if;
end do:
end proc:
for n from 1 do
if isA007629(n) then
printf("%d,\n",n);
end if;
end do: # R. J. Mathar, Jan 12 2016
-
keithQ[n_Integer] := Module[{b = IntegerDigits[n], s, k = 0}, s = Total[b]; While[s < n, AppendTo[b, s]; k++; s = 2*s - b[[k]]]; s == n]; Select[Range[10, 100000], keithQ] (* T. D. Noe, Mar 15 2011 *)
nxt[n_]:=Rest[Flatten[Join[{n,Total[n]}]]]; repfigitQ[m_]:=MemberQ[ NestWhileList[ nxt,IntegerDigits[m],Max[#]<=m&][[All,-1]],m]; Select[ Range[10,45*10^6],repfigitQ] (* Harvey P. Dale, Sep 02 2016 *)
keithQ[n_, e_] := Last[NestWhile[Rest[Append[#, Apply[Plus, #]]]&, IntegerDigits[n^e], Last[#]9
a007629[n_] := Select[Range[10, n], keithQ[#, 1]&]
a007629[45*10^6] (* Hartmut F. W. Hoft, Jun 02 2021 *)
-
is(n)=if(n<14,return(0));my(v=digits(n),t=#v);while(v[#v]Charles R Greathouse IV, Feb 01 2013
-
A007629_list = []
for n in range(10,10**9):
x = [int(d) for d in str(n)]
y = sum(x)
while y < n:
x, y = x[1:]+[y], 2*y-x[0]
if y == n:
A007629_list.append(n) # Chai Wah Wu, Sep 12 2014
12th term corrected from 2508 to 2580, Aug 15 1997
A281915
4th power analog of Keith numbers.
Original entry on oeis.org
1, 7, 19, 20, 22, 25, 28, 36, 77, 107, 110, 175, 789, 1528, 1932, 3778, 5200, 7043, 8077, 38855, 41234, 44884, 49468, 204386, 763283, 9423515, 73628992, 87146144, 146124072, 146293356, 326194628, 1262293219, 1321594778, 2767787511, 11511913540, 12481298961, 13639550655
Offset: 1
175^4 = 937890625:
9 + 3 + 7 + 8 + 9 + 0 + 6 + 2 + 5 = 49;
3 + 7 + 8 + 9 + 0 + 6 + 2 + 5 + 49 = 89;
7 + 8 + 9 + 0 + 6 + 2 + 5 + 49 + 89 = 175.
-
with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
for n from 1 to q do b:=n^w; a:=[];
for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
-
(* function keithQ[ ] is defined in A007629 *)
a281915[n_] := Join[{1, 7}, Select[Range[10, n], keithQ[#, 4]&]]
a281915[10^6] (* Hartmut F. W. Hoft, Jun 02 2021 *)
A281916
5th power analog of Keith numbers.
Original entry on oeis.org
1, 28, 35, 36, 46, 51, 99, 109, 191, 239, 476, 491, 1022, 1126, 1358, 1362, 15156, 21581, 44270, 63377, 100164, 375830, 388148, 2749998, 5215505, 10158487, 81082532, 87643314, 410989134, 1485204944, 3496111364, 3829840893, 15889549579, 16107462404, 16766005098, 17608009898
Offset: 1
109^5 = 15386239549:
1 + 5 + 3 + 8 + 6 + 2 + 3 + 9 + 5 + 4 + 9 = 55;
5 + 3 + 8 + 6 + 2 + 3 + 9 + 5 + 4 + 9 + 55 = 109.
-
with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
for n from 1 to q do b:=n^w; a:=[];
for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
-
(* function keithQ[ ] is defined in A007629 *)
a281916[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 5]&]]
a281916[5*10^5] (* Hartmut F. W. Hoft, Jun 03 2021 *)
A281918
7th power analog of Keith numbers.
Original entry on oeis.org
1, 18, 27, 31, 34, 43, 53, 58, 68, 145, 187, 314, 826, 2975, 37164, 40853, 58530, 72795, 77058, 160703, 187617, 1926759, 6291322, 6628695, 25285305, 31292514, 33968486, 54954185, 71593237, 125921697, 555963577, 575307142, 2393596216, 2444508547, 42544333760, 97812197525
Offset: 1
145^7 = 1347646586640625:
1 + 3 + 4 + 7 + 6 + 4 + 6 + 5 + 8 + 6 + 6 + 4 + 0 + 6 + 2 + 5 = 73;
3 + 4 + 7 + 6 + 4 + 6 + 5 + 8 + 6 + 6 + 4 + 0 + 6 + 2 + 5 + 73 = 145.
-
with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
for n from 1 to q do b:=n^w; a:=[];
for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
-
(* function keithQ[ ] is defined in A007629 *)
a281918[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 7]&]]
a281918[10^6] (* Hartmut F. W. Hoft, Jun 03 2021 *)
A281919
8th-power analog of Keith numbers.
Original entry on oeis.org
1, 30, 46, 54, 63, 207, 394, 693, 694, 718, 20196, 42664, 80051, 90135, 91447, 93136, 207846, 324121, 361401, 421609, 797607, 802702, 882227, 1531788, 1788757, 1789643, 4028916, 4176711, 6692664, 15643794, 31794346, 65335545, 140005632, 144311385, 153364253
Offset: 1
-
with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
for n from 1 to q do b:=n^w; a:=[];
for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
-
(* function keithQ[ ] is defined in A007629 *)
a281919[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 8]&]]
a281919[10^6] (* Hartmut F. W. Hoft, Jun 03 2021 *)
A281920
9th-power analog of Keith numbers.
Original entry on oeis.org
1, 54, 71, 81, 196, 424, 451, 2394, 9057, 51737, 52141, 104439, 227914, 228088, 1019555, 1096369, 1202713, 1687563, 1954556, 3332130, 3652731, 4177592, 31669012, 79937731, 81478913, 148341053, 168763202, 182573136, 342393476, 773367191, 1450679282, 2914657310, 3282344153
Offset: 1
196^9 = 426878854210636742656:
4 + 2 + 6 + 8 + 7 + 8 + 8 + 5 + 4 + 2 + 1 + 0 + 6 + 3 + 6 + 7 + 4 + 2 + 6 + 5 + 6 = 100;
2 + 6 + 8 + 7 + 8 + 8 + 5 + 4 + 2 + 1 + 0 + 6 + 3 + 6 + 7 + 4 + 2 + 6 + 5 + 6 + 100 = 196.
-
with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
for n from 1 to q do b:=n^w; a:=[];
for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
-
(* function keithQ[ ] is defined in A007629 *)
a281920[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 9]&]]
a281920[10^6] (* Hartmut F. W. Hoft, Jun 03 2021 *)
A281921
10th-power analog of Keith numbers.
Original entry on oeis.org
1, 82, 85, 94, 97, 106, 117, 459, 1197, 24615, 24657, 26184, 87664, 117099, 538168, 1049708, 1229174, 2210323, 4587773, 11019224, 96167938, 104719358, 202511251, 226456915, 821871524, 1811437987, 1832881095, 3530066559, 7414362499, 7906250753, 15607432165, 15631766564
Offset: 1
106^10 = 179084769654285362176: 1 + 7 + 9 + 0 + 8 + 4 + 7 + 6 + 9 + 6 + 5 + 4 + 2 + 8 + 5 + 3 + 6 + 2 + 1 + 7 + 6 = 106.
-
with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
for n from 1 to q do b:=n^w; a:=[];
for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
-
(* function keithQ[ ] is defined in A007629 *)
a281921[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 10]&]]
a281921[10^6] (* Hartmut F. W. Hoft, Jun 03 2021 *)
A346067
Smallest prime that is the n-th power analog of Keith numbers.
Original entry on oeis.org
2, 37, 17, 7, 109, 36013476739, 31, 80051, 71, 97, 107, 13093, 103, 127, 107, 163, 991, 181, 157, 181, 199, 193, 271, 31663, 211, 307, 307, 5318989651, 673, 8297, 331, 811, 359, 463
Offset: 1
a(2) = 37 because 37^2 = 1369. Then 1+3+6+9 = 19 and 3+6+9+19 = 37.
-
KeithPowQ[m_Integer,n_]:=Module[{b=IntegerDigits[m^n],s,k=0},s=Total[b];While[sA007629 *)
Showing 1-8 of 8 results.
Comments