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

A003226 Automorphic numbers: m^2 ends with m.

Original entry on oeis.org

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

Views

Author

Keywords

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

Crossrefs

Programs

  • 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
    
  • Magma
    [n: n in [0..10^7] | Intseq(n^2)[1..#Intseq(n)] eq Intseq(n)]; // Vincenzo Librandi, Jul 03 2015
    
  • 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 *)
  • 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
    
  • 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< 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
  • 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
    

Formula

Equals {0, 1} union A007185 union A016090.

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

A008851 Congruent to 0 or 1 mod 5.

Original entry on oeis.org

0, 1, 5, 6, 10, 11, 15, 16, 20, 21, 25, 26, 30, 31, 35, 36, 40, 41, 45, 46, 50, 51, 55, 56, 60, 61, 65, 66, 70, 71, 75, 76, 80, 81, 85, 86, 90, 91, 95, 96, 100, 101, 105, 106, 110, 111, 115, 116, 120, 121, 125, 126, 130, 131, 135, 136, 140, 141, 145, 146, 150, 151
Offset: 1

Views

Author

Keywords

Comments

Numbers k that have the same last digit as k^2.

References

  • L. E. Dickson, History of the Theory of Numbers, I, p. 459.

Crossrefs

Programs

  • Haskell
    a008851 n = a008851_list !! (n-1)
    a008851_list = [10*n + m | n <- [0..], m <- [0,1,5,6]]
    -- Reinhard Zumkeller, Jul 27 2011
    
  • Magma
    [n: n in [0..200] | n mod 5 in {0, 1}]; // Vincenzo Librandi, Nov 17 2014
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=a[n-2]+5 od: seq(a[n], n=0..61); # Zerinvary Lajos, Mar 16 2008
  • Mathematica
    Select[Range[0, 151], MemberQ[{0, 1}, Mod[#, 5]] &] (* T. D. Noe, Mar 31 2013 *)
  • PARI
    a(n) = 5*(n\2)+bitand(n,1); /* Joerg Arndt, Mar 31 2013 */
    
  • PARI
    a(n) = floor((5/3)*floor(3*(n-1)/2)); /* Joerg Arndt, Mar 31 2013 */
    

Formula

a(n) = 5*n - a(n-1) - 9, n >= 2. - Vincenzo Librandi, Nov 18 2010 [Corrected for offset by David Lovler, Oct 10 2022]
G.f.: x^2*(1+4*x) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 07 2011
a(n+1) = Sum_{k>=0} A030308(n,k)*A146523(k). - Philippe Deléham, Oct 17 2011
a(n) = floor((5/3)*floor(3*(n-1)/2)). - Clark Kimberling, Jul 04 2012
a(n) = (10*n - 13 - 3*(-1)^n)/4. - Robert Israel, Nov 17 2014 [Corrected by David Lovler, Sep 21 2022]
E.g.f.: 4 + ((10*x - 13)*exp(x) - 3*exp(-x))/4. - David Lovler, Sep 11 2022
Sum_{n>=2} (-1)^n/a(n) = sqrt(1+2/sqrt(5))*Pi/10 + log(phi)/(2*sqrt(5)) + log(5)/4, where phi is the golden ratio (A001622). - Amiram Eldar, Oct 12 2022

Extensions

Offset corrected by Reinhard Zumkeller, Jul 27 2011

A018834 Numbers k such that the decimal expansion of k^2 contains k as a substring.

Original entry on oeis.org

0, 1, 5, 6, 10, 25, 50, 60, 76, 100, 250, 376, 500, 600, 625, 760, 1000, 2500, 3760, 3792, 5000, 6000, 6250, 7600, 9376, 10000, 14651, 25000, 37600, 50000, 60000, 62500, 76000, 90625, 93760, 100000, 109376, 250000, 376000, 495475, 500000, 505025
Offset: 1

Views

Author

Keywords

Examples

			25^2 = 625 which contains 25.
3792^2 = 14_3792_64, 14651^2 = 2_14651_801.
		

Crossrefs

Cf. A000290. Supersequence of A029943.
Cf. A018826 (base 2), A018827 (base 3), A018828 (base 4), A018829 (base 5), A018830 (base 6), A018831 (base 7), A018832 (base 8), A018833 (base 9).
Cf. A029942 (cubes), A075904 (4th powers), A075905 (5th powers).

Programs

  • Haskell
    import Data.List (isInfixOf)
    a018834 n = a018834_list !! (n-1)
    a018834_list = filter (\x -> show x `isInfixOf` show (x^2)) [0..]
    -- Reinhard Zumkeller, Jul 27 2011
    
  • Mathematica
    Select[Range[510000], MemberQ[FromDigits /@ Partition[IntegerDigits[#^2], IntegerLength[#], 1], #] &] (* Jayanta Basu, Jun 29 2013 *)
    Select[Range[0,510000],StringPosition[ToString[#^2],ToString[#]]!={}&] (* Ivan N. Ianakiev, Oct 02 2016 *)
  • Python
    from itertools import count, islice
    def A018834_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n:str(n) in str(n**2), count(max(startvalue,0)))
    A018834_list = list(islice(A018834_gen(),20)) # Chai Wah Wu, Apr 04 2023

A115738 k is prime and digits of k^2 include digits of k as substring.

Original entry on oeis.org

5, 66952741, 146509717, 753348181, 562984507451, 860628177919, 978058181203, 50385563791193
Offset: 1

Views

Author

Giovanni Resta, Jan 30 2006

Keywords

Comments

Subset of A046831.
a(9) > 10^14. Primes 43473168442554675203, 20944025626422831137347, 35083931242599287584057, and 569177878099445999493598065089 are also terms. - Giovanni Resta, Sep 10 2018

Examples

			66952741^2 = 4482_66952741_3081.
		

Crossrefs

Extensions

a(8) from Giovanni Resta, Sep 08 2018

A046834 Internal digits of n^2 include digits of n as subsequence.

Original entry on oeis.org

50, 60, 250, 500, 600, 760, 1050, 2050, 2500, 3050, 3628, 3710, 3760, 3792, 4050, 4410, 5000, 5010, 5050, 5060, 5250, 6000, 6010, 6050, 6250, 6760, 7050, 7560, 7600, 8050, 8250, 8260, 8882, 9050, 9460, 10050, 10500, 14650, 14651, 20050, 20500
Offset: 1

Views

Author

Keywords

Comments

If n is a member then so is 10*n. - Robert Israel, May 07 2020

Examples

			a(7) = 1050 is a term because 1050^2 = 1102500; remove the first and last to get internal digits 10250, and 1050 is a subsequence of 10250. - _Robert Israel_, May 07 2020
		

Crossrefs

Programs

  • Maple
    filter:= n -> StringTools:-IsSubSequence(sprintf("%d",n),sprintf("%d",n^2)[2..-2]):
    select(filter, [$10..30000]); # Robert Israel, May 07 2020
  • Python
    from itertools import count, islice
    def A046834_gen(startvalue=1): # generator of terms >= startvalue
        for k in count(max(startvalue,1)):
            c = iter(str(k**2)[1:-1])
            if all(map(lambda b:any(map(lambda a:a==b,c)),str(k))):
                yield k
    A046834_list = list(islice(A046834_gen(),20)) # Chai Wah Wu, Apr 03 2023

A046835 Internal digits of n^2 include digits of n as subsequence, n does not end in 0.

Original entry on oeis.org

3628, 3792, 8882, 14651, 28792, 36574, 37026, 37028, 37073, 58808, 68323, 71213, 75884, 75887, 75888, 87073, 88526, 88796, 88808, 94682, 105125, 105153, 146308, 161574, 269622, 368323, 369255, 369482, 369863, 370137, 370156, 370162, 370178
Offset: 1

Views

Author

Keywords

Examples

			From _David A. Corneth_, Aug 29 2023: (Start)
3628 is in the sequence as 3628^2 = 13162384 and so 3628 is in the internal digits; 1(3)1(6)(2)3(8)4, reading from left to right the digits in brackets are 3628 and all these digits are internal digits of 13162384.
1011 is NOT in the seuence as 1011^2 = 1022121 and so 1011 is in the digits;
(1)(0)22(1)2(1) but not all these digits are internal digits of 1022121. (End)
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A046835_gen(startvalue=1): # generator of terms >= startvalue
        for k in count(max(startvalue,1)):
            if k%10:
                c = iter(str(k**2)[1:-1])
                if all(map(lambda b:any(map(lambda a:a==b,c)),str(k))):
                    yield k
    A046835_list = list(islice(A046835_gen(),20)) # Chai Wah Wu, Apr 03 2023

A119238 Numbers k such that the decimal representation of k is contained as substring in that of the k-th triangular number.

Original entry on oeis.org

1, 5, 19, 25, 199, 625, 1999, 2102, 5582, 9376, 9909, 10100, 16833, 19999, 41012, 55741, 74491, 83885, 88102, 90625, 151774, 199999, 201002, 558257, 626522, 740312, 798097, 810062, 890625, 1001000, 1030563, 1668333, 1999999, 2646751
Offset: 1

Views

Author

Giovanni Resta, May 10 2006

Keywords

Crossrefs

Cf. A046831.

Programs

  • Mathematica
    Select[Range@100000, ({}!=StringPosition[ToString[ #(#+1)/2], ToString@# ]) &]
    Select[Range[3*10^6],SequenceCount[IntegerDigits[(#(#+1))/2], IntegerDigits[ #]]>0&] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Dec 26 2015 *)
Showing 1-7 of 7 results.