[go: up one dir, main page]

login
Search: a018834 -id:a018834
     Sort: relevance | references | number | modified | created      Format: long | short | data
Automorphic numbers: m^2 ends with m.
(Formerly M3752)
+10
48
0, 1, 5, 6, 25, 76, 376, 625, 9376, 90625, 109376, 890625, 2890625, 7109376, 12890625, 87109376, 212890625, 787109376, 1787109376, 8212890625, 18212890625, 81787109376, 918212890625, 9918212890625, 40081787109376, 59918212890625, 259918212890625, 740081787109376
OFFSET
1,3
COMMENTS
Also called curious numbers.
For entries after the second, two successive terms sum up to a total having the form 10^n + 1. - Lekraj Beedassy, Apr 29 2005 [This comment is clearly wrong as stated. The sums of two consecutive terms are 1, 6, 11, 31, 101, 452, 1001, 10001, 100001, 200001, 1000001, 3781250, .... - T. D. Noe, Nov 14 2010]
If a d-digit number n is in the sequence, then so is 10^d+1-n. However, the same number can be 10^d+1-n for different n in the sequence (e.g., 10^3+1-376 = 10^4+1-9376 = 625), which spoils Beedassy's comment. - Robert Israel, Jun 19 2015
Substring of both its square and its cube not congruent to 0 (mod 10). See A029943. - Robert G. Wilson v, Jul 16 2005
a(n)^k ends with a(n) for k > 0; see also A029943. - Reinhard Zumkeller, Nov 26 2011
Apart from initial term, a subsequence of A046831. - M. F. Hasler, Dec 05 2012
This is also the sequence of numbers such that the n-th m-gonal number ends in n for any m == 0,4,8,16 (mod 20). - Robert Dawson, Jul 09 2018
Apart from 6, a subsequence of A301912. - Robert Dawson, Aug 01 2018
REFERENCES
J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 76, p. 26, Ellipses, Paris 2008.
V. deGuerre and R. A. Fairbairn, Automorphic numbers, J. Rec. Math., 1 (No. 3, 1968), 173-179.
R. A. Fairbairn, More on automorphic numbers, J. Rec. Math., 2 (No. 3, 1969), 170-174.
Jan Gullberg, Mathematics, From the Birth of Numbers, W. W. Norton & Co., NY, page 253-254.
B. A. Naik, 'Automorphic numbers' in 'Science Today'(subsequently renamed '2001') May 1982 pp. 59, Times of India, Mumbai.
Ya. I. Perelman, Algebra can be fun, pp. 97-98.
Clifford A. Pickover, A Passion for Mathematics, John Wiley & Sons, Hoboken, 2005, p. 64.
C. P. Schut, Idempotents. Report AM-R9101, Centrum voor Wiskunde en Informatica, Amsterdam, 1991.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..1786 (terms n = 1..200 from Vincenzo Librandi)
Robert Dawson, On Some Sequences Related to Sums of Powers, J. Int. Seq., Vol. 21 (2018), Article 18.7.6.
R. A. Fairbairn, More on automorphic numbers, J. Rec. Math., 2.3 (1969), 170-174. (Annotated scanned copy)
V. deGuerre & R. A. Fairbairn, Automorphic numbers, J. Rec. Math., 1.3 (1968), 173-179
Beeler, M., Gosper, R. W. and Schroeppel, R., HAKMEM. MIT AI Memo 239, Feb 29 1972 (Item 59 provides a 40-digit member of this sequence).
W. Schneider, Automorphic Numbers
C. P. Schut, Idempotents, Report AM-R9101, Centre for Mathematics and Computer Science, Amsterdam, 1991. (Annotated scanned copy)
Eric Weisstein's World of Mathematics, Automorphic Number
Xiaolong Ron Yu, Curious Numbers, Pi Mu Epsilon Journal, Spring 1999, pp. 819-823.
FORMULA
Equals {0, 1} union A007185 union A016090.
MAPLE
V:= proc(m) option remember;
select(t -> t^2 - t mod 10^m = 0, map(s -> seq(10^(m-1)*j+s, j=0..9), V(m-1)))
end proc:
V(0):= {0, 1}:
V(1):= {5, 6}:
sort(map(op, [V(0), seq(V(i) minus V(i-1), i=1..50)])); # Robert Israel, Jun 19 2015
MATHEMATICA
f[k_] := (r = Reduce[0 < 10^k < n < 10^(k + 1) && n^2 == m*10^(k + 1) + n, {n, m}, Integers]; If[Head[r] === And, n /. ToRules[r], n /. {ToRules[r]}]); Flatten[ Join[{0, 1}, Table[f[k], {k, 0, 13}]]] (* Jean-François Alcover, Dec 01 2011 *)
Union@ Join[{1}, Array[PowerMod[5, 2^#, 10^#] &, 16, 0], Array[PowerMod[16, 5^#, 10^#] &, 16, 0]] (* Robert G. Wilson v, Jul 23 2018 *)
PROG
(Haskell)
import Data.List (isSuffixOf)
a003226 n = a003226_list !! (n-1)
a003226_list = filter (\x -> show x `isSuffixOf` show (x^2)) a008851_list
-- Reinhard Zumkeller, Jul 27 2011
(PARI) is_A003226(n)={n<2 || 10^valuation(n^2-n, 10)>n} \\ M. F. Hasler, Dec 05 2012
(PARI) A003226(n)={ n<3 & return(n-1); my(i=10, j=10, b=5, c=6, a=b); for( k=4, n, while(b<=a, b=b^2%i*=10); while(c<=a, c=(2-c)*c%j*=10); a=min(b, c)); a } \\ M. F. Hasler, Dec 06 2012
(Sage)
def automorphic(maxdigits, pow, base=10) :
morphs = [[0]]
for i in range(maxdigits):
T=[d*base^i+x for x in morphs[-1] for d in range(base)]
morphs.append([x for x in T if x^pow % base^(i+1) == x])
res = list(set(sum(morphs, []))); res.sort()
return res
# call with pow=2 for this sequence, Eric M. Schmidt, Feb 09 2014
(Magma) [n: n in [0..10^7] | Intseq(n^2)[1..#Intseq(n)] eq Intseq(n)]; // Vincenzo Librandi, Jul 03 2015
(Python)
from itertools import count, islice
from sympy.ntheory.modular import crt
def A003226_gen(): # generator of terms
a = 0
yield from (0, 1)
for n in count(0):
b = sorted((int(crt(m:=(1<<n, 5**n), (0, 1))[0]), int(crt(m, (1, 0))[0])))
if b[0] > a:
yield from b
a = b[1]
elif b[1] > a:
yield b[1]
a = b[1]
A003226_list = list(islice(A003226_gen(), 15)) # Chai Wah Wu, Jul 25 2022
KEYWORD
nonn,base,nice,easy,changed
EXTENSIONS
More terms from Michel ten Voorde, Apr 11 2001
Edited by David W. Wilson, Sep 26 2002
Incorrect statement removed from title by Robert Dawson, Jul 09 2018
STATUS
approved
Numbers n such that n is a substring of its square when both are written in base 2.
+10
15
0, 1, 2, 4, 8, 16, 27, 32, 41, 54, 64, 82, 108, 128, 145, 164, 165, 256, 283, 290, 328, 487, 512, 545, 566, 580, 974, 1024, 1090, 1132, 1160, 1773, 1948, 2048, 2113, 2180, 2320, 2701, 3546, 3896, 4096, 4226, 4261, 4360, 4757, 5402, 7092, 7625, 8079, 8192
OFFSET
1,3
COMMENTS
Complement of A136492. - Reinhard Zumkeller, Jan 01 2008
A136510(a(n)) = 2 for n>0. - Reinhard Zumkeller, Jan 03 2008
From Robert Israel, Jul 11 2018: (Start)
Contains A000079.
If x satisfies x^2 == 8*x + 1 (mod 2^m) and 0 < x < 2^(m-3) then x is in the sequence. Note that x^2 == 8*x + 1 has 4 solutions mod 2^m for m >= 3. Terms obtained in this way include 27, 283, 1773, 9965, 55579, 206573, .... (End)
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..700 (first 200 terms from Robert Israel)
EXAMPLE
27 in binary is 11011 and 27^2 = 729 in binary is 1011011001 which has substring 11011. - Michael Somos, Mar 16 2015
MAPLE
filter:= proc(n) local S, S2;
S:= convert(convert(n, binary), string);
S2:= convert(convert(n^2, binary), string);
StringTools:-Search(S, S2)<>0
end proc:
select(filter, [$0..10000]); # Robert Israel, Jul 11 2018
MATHEMATICA
Select[Range[0, 8192], {} != SequencePosition @@ IntegerDigits[{#^2, #}, 2] &] (* Giovanni Resta, Aug 20 2018 *)
Select[Range[0, 10000], SequenceCount[IntegerDigits[#^2, 2], IntegerDigits[#, 2]]>0&] (* Harvey P. Dale, May 03 2022 *)
PROG
(PARI) issub(b, bs, k) = {for (i=1, #b, if (b[i] != bs[i+k-1], return (0)); ); return (1); }
a076141(n) = {if (n, b = binary(n), b = [0]); if (n, bs = binary(n^2), bs = [0]); sum(k=1, #bs - #b +1, issub(b, bs, k)); }
lista(nn) = for (n=0, nn, if (a076141(n) == 1, print1(n, ", "))); \\ Michel Marcus, Mar 15 2015
(Python)
def ok(n): return bin(n)[2:] in bin(n**2)[2:]
print([k for k in range(9999) if ok(k)]) # Michael S. Branicky, Apr 04 2024
CROSSREFS
Cf. A018827 (base 3), A018828 (base 4), A018829 (base 5), A018830 (base 6), A018831 (base 7), A018832 (base 8), A018833 (base 9), A018834 (base 10).
KEYWORD
nonn,base
STATUS
approved
Numbers k such that the decimal expansion of k^3 contains k as a substring.
+10
9
0, 1, 4, 5, 6, 9, 10, 24, 25, 32, 40, 49, 50, 51, 56, 60, 75, 76, 90, 99, 100, 125, 240, 249, 250, 251, 375, 376, 400, 490, 499, 500, 501, 510, 600, 624, 625, 749, 750, 751, 760, 782, 875, 900, 990, 999, 1000, 1249, 1250, 2400, 2490, 2500, 2510
OFFSET
1,3
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..1000 (first 500 terms from Reinhard Zumkeller)
EXAMPLE
24 is a term as 24^3 = 13824 contains 24 as a substring.
250 is a term as 250^3 = 1562500 contains 250 as a substring.
6^3 = 21_6, 782^3 = 4_782_11768.
MATHEMATICA
n3ssQ[n_]:=Module[{idn=IntegerDigits[n], idn3=Partition[ IntegerDigits[ n^3], IntegerLength[n], 1]}, MemberQ[idn3, idn]]; Join[{0}, Select[Range[ 2600], n3ssQ]] (* Harvey P. Dale, Jan 23 2012 *)
Select[Range[0, 2600], SequenceCount[IntegerDigits[#^3], IntegerDigits[ #]]> 0&] (* Harvey P. Dale, Aug 29 2021 *)
PROG
(Haskell)
import Data.List (isInfixOf)
a029942 n = a029942_list !! (n-1)
a029942_list = [x | x <- [0..], show x `isInfixOf` show (x^3)]
-- Reinhard Zumkeller, Feb 29 2012
CROSSREFS
Cf. A018834 (squares), A075904 (4th powers), A075905 (5th powers), A136490 (base 2).
Cf. A000578. Supersequence of A029943.
KEYWORD
nonn,base,nice
STATUS
approved
Numbers n such that n is a substring of its square in base 3 (written in base 10).
+10
8
0, 1, 3, 7, 9, 27, 32, 43, 81, 131, 243, 287, 706, 729, 1330, 1390, 1679, 1832, 2187, 2899, 3848, 4170, 5234, 6436, 6561, 11544, 12510, 14261, 19308, 19683, 30433, 33181, 34135, 35203, 35323, 37530, 38669, 42783, 59049, 72070, 79583, 93539, 99543
OFFSET
1,3
MATHEMATICA
Select[Range[0, 10^5], StringContainsQ[IntegerString[#^2, 3], IntegerString[#, 3]] &] (* Paolo Xausa, Apr 05 2024 *)
PROG
(Python)
from sympy.ntheory import digits
def s(n, base=3): return "".join(map(str, digits(n, base)[1:]))
def ok(n): return s(n) in s(n**2)
print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Apr 04 2024
CROSSREFS
Cf. A018826 (base 2), A018828 (base 4), A018829 (base 5), A018830 (base 6), A018831 (base 7), A018832 (base 8), A018833 (base 9), A018834 (base 10).
KEYWORD
nonn,base
STATUS
approved
Numbers n such that n is a substring of its square (both n and n squared in base 4) (written in base 10).
+10
8
0, 1, 4, 16, 41, 54, 64, 164, 165, 256, 290, 487, 545, 566, 1024, 1160, 1948, 2180, 3546, 4096, 4226, 4261, 7625, 8321, 8720, 9514, 13813, 13867, 15913, 16158, 16384, 16904, 33284, 46126, 54854, 55468, 63652, 64632, 65536, 66050, 67616, 113047, 130591
OFFSET
1,3
MATHEMATICA
Select[Range[0, 150000], SequenceCount[IntegerDigits[#^2, 4], IntegerDigits[#, 4]]>0&] (* Harvey P. Dale, Aug 13 2023 *)
CROSSREFS
Cf. A018826 (base 2), A018827 (base 3), A018829 (base 5), A018830 (base 6), A018831 (base 7), A018832 (base 8), A018833 (base 9), A018834 (base 10).
KEYWORD
nonn,base
EXTENSIONS
Definition clarified by Harvey P. Dale, Aug 13 2023
STATUS
approved
Numbers n such that n is a substring of its square in base 5 (written in base 10).
+10
8
0, 1, 5, 14, 25, 38, 125, 349, 408, 543, 625, 3125, 4743, 5292, 10888, 12196, 13201, 15625, 25509, 26460, 36536, 43614, 55038, 57837, 78125, 136888, 207889, 219698, 234783, 390625, 445663, 1090347, 1098490, 1336564, 1437874, 1720752, 1915227
OFFSET
1,3
MATHEMATICA
Select[Range[0, 2*10^6], SequenceCount[IntegerDigits[ #^2, 5], IntegerDigits[ #, 5]]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 04 2019 *)
CROSSREFS
Cf. A018826 (base 2), A018827 (base 3), A018828 (base 4), A018830 (base 6), A018831 (base 7), A018832 (base 8), A018833 (base 9), A018834 (base 10).
KEYWORD
nonn,base
STATUS
approved
Numbers n such that n is a substring of its square in base 6 (written in base 10).
+10
8
0, 1, 3, 4, 6, 9, 18, 24, 28, 36, 54, 81, 108, 136, 144, 168, 216, 324, 486, 648, 816, 864, 1008, 1216, 1296, 1944, 2916, 3888, 4896, 5184, 6048, 6458, 6561, 7296, 7776, 8451, 11664, 16768, 17496, 22779, 23328, 23985, 29376, 29889, 31104, 34299, 34549, 36288
OFFSET
1,3
MATHEMATICA
Select[Range[0, 10^5], StringContainsQ[IntegerString[#^2, 6], IntegerString[#, 6]] &] (* Paolo Xausa, Apr 05 2024 *)
CROSSREFS
Cf. A018826 (base 2), A018827 (base 3), A018828 (base 4), A018829 (base 5), A018831 (base 7), A018832 (base 8), A018833 (base 9), A018834 (base 10).
KEYWORD
nonn,base
STATUS
approved
Numbers n such that n is a substring of its square in base 7 (written in base 10).
+10
8
0, 1, 7, 30, 49, 285, 343, 911, 1900, 2208, 2401, 13962, 16807, 59763, 64098, 69128, 85880, 97734, 117649, 195032, 418341, 754422, 823543, 2162126, 2629229, 2790841, 3488518, 3842400, 4960401, 5764801, 7923812, 8559490, 15134882, 19765943, 31466333, 36415297
OFFSET
1,3
MATHEMATICA
Select[Range[0, 10^7], StringContainsQ[IntegerString[#^2, 7], IntegerString[#, 7]] &] (* Paolo Xausa, Apr 05 2024 *)
CROSSREFS
Cf. A018826 (base 2), A018827 (base 3), A018828 (base 4), A018829 (base 5), A018830 (base 6), A018832 (base 8), A018833 (base 9), A018834 (base 10).
KEYWORD
nonn,base
EXTENSIONS
a(35)-a(36) from Pontus von Brömssen, Apr 04 2024
STATUS
approved
Numbers n such that n is a substring of its square in base 8 (written in base 10).
+10
8
0, 1, 8, 27, 64, 283, 290, 512, 545, 1948, 2320, 4096, 4360, 8452, 13813, 16158, 16642, 23063, 26139, 27427, 27734, 32768, 33025, 67616, 87723, 110503, 129264, 130591, 133136, 184504, 206573, 226094, 262144, 264200, 526340, 701784, 1044728, 1050626
OFFSET
1,3
MATHEMATICA
Select[Range[0, 10^6], StringContainsQ[IntegerString[#^2, 8], IntegerString[#, 8]] &] (* Paolo Xausa, Apr 05 2024 *)
CROSSREFS
Cf. A018826 (base 2), A018827 (base 3), A018828 (base 4), A018829 (base 5), A018830 (base 6), A018831 (base 7), A018833 (base 9), A018834 (base 10).
KEYWORD
nonn,base
STATUS
approved
Numbers n such that n is a substring of its square in base 9 (written in base 10).
+10
8
0, 1, 9, 32, 43, 81, 287, 706, 729, 4170, 6561, 30433, 37530, 38669, 42783, 59049, 99543, 192211, 281782, 394981, 415578, 531441, 561785, 666112, 1723076, 2046242, 3039924, 3485488, 4782969, 8684182, 11512384, 12684634, 18346925, 19988197, 29728486, 31190295
OFFSET
1,3
MATHEMATICA
Select[Range[0, 10^7], StringContainsQ[IntegerString[#^2, 9], IntegerString[#, 9]] &] (* Paolo Xausa, Apr 05 2024 *)
CROSSREFS
Cf. A018826 (base 2), A018827 (base 3), A018828 (base 4), A018829 (base 5), A018830 (base 6), A018831 (base 7), A018832 (base 8), A018834 (base 10).
KEYWORD
nonn,base
EXTENSIONS
a(35)-a(36) from Pontus von Brömssen, Apr 04 2024
STATUS
approved

Search completed in 0.077 seconds