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.

A046829 Numbers k such that digits of k^2 include digits of k as subsequence.

Original entry on oeis.org

0, 1, 5, 6, 10, 11, 25, 50, 60, 76, 95, 96, 100, 101, 105, 110, 125, 205, 250, 305, 371, 376, 405, 441, 500, 501, 505, 506, 525, 600, 601, 605, 625, 676, 705, 756, 760, 805, 825, 826, 905, 946, 950, 960, 976, 995, 996, 1000, 1001, 1005, 1006, 1010, 1011
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A046827, A062118 (subsequence).

Programs

  • Mathematica
    fQ[n_]:=LongestCommonSequence[ToString[n^2],ToString[n]]==ToString[n];
    Select[Range[0,1011],fQ[#]&] (* Ivan N. Ianakiev, Dec 29 2023 *)
  • Python
    from itertools import count, islice
    def A046829_gen(startvalue=0): # generator of terms >= startvalue
        for k in count(max(startvalue,0)):
            c = iter(str(k**2))
            if all(map(lambda b:any(map(lambda a:a==b,c)),str(k))):
                yield k
    A046829_list = list(islice(A046829_gen(),20)) # Chai Wah Wu, Apr 03 2023

Extensions

Offset 1 from Alois P. Heinz, Apr 03 2023

A029772 Every digit that appears in k also appears at least once in k^2.

Original entry on oeis.org

0, 1, 5, 6, 10, 11, 25, 27, 50, 55, 60, 63, 64, 66, 74, 76, 95, 96, 99, 100, 101, 105, 110, 111, 112, 115, 116, 125, 139, 142, 199, 205, 211, 222, 225, 232, 250, 255, 261, 270, 275, 277, 278, 285, 288, 305, 323, 363, 364, 366, 371, 376, 405, 421
Offset: 1

Views

Author

Keywords

Examples

			55 is in the list because 55^2 = 3025 and 5 appears in 3025.
323 is in the list because 323^2 = 104329 and 2, 3 appear in 104329.
		

Crossrefs

See A046827, where it is required that the digits of n appear in n^2 at least as often as they appear in n.

Programs

  • Magma
    [n: n in [0..500] | Intseq(n) subset Intseq(n^2)]; // Bruno Berselli, Aug 01 2013
    
  • Mathematica
    d[n_]:=IntegerDigits[n]; Select[Range[0,421],Complement[d[#],d[#^2]]=={}&] (* Jayanta Basu, Jun 02 2013 *)
  • Python
    from itertools import count, islice
    def A029772_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n:set(str(n)) <= set(str(n**2)), count(max(startvalue,0)))
    A029772_list = list(islice(A029772_gen(),20)) # Chai Wah Wu, Apr 03 2023

A064827 Numbers k such that each digit of k occurs among the digits of k^2.

Original entry on oeis.org

1, 5, 6, 10, 11, 25, 27, 50, 60, 63, 64, 74, 76, 95, 96, 100, 101, 105, 110, 125, 139, 142, 205, 250, 255, 261, 270, 275, 277, 278, 285, 305, 364, 371, 376, 405, 421, 441, 463, 472, 493, 497, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 523, 524, 525, 593, 600, 601, 602
Offset: 1

Views

Author

Joseph L. Pe, Feb 14 2002

Keywords

Comments

That is, if n is d digits long, then each one of those d digits occurs in the digits of n^2.

Examples

			125^2 = 15625, which contains all digits of 125, so 125 is a term of the sequence.
55 is not here because 55^2 = 3025, which has only one 5.
		

Crossrefs

Cf. A046827 (essentially the same).

Programs

  • Mathematica
    Reap[Do[a = DigitCount[n^2]; b = DigitCount[n]; If[Min[a-b] >= 0, Sow[n]], {n, 1, 10^3}]][[2,1]]
  • Python
    from itertools import count, islice
    from collections import Counter
    def A064827_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda k:Counter(str(k))<=Counter(str(k**2)),count(max(startvalue,1)))
    A064827_list = list(islice(A064827_gen(),20)) # Chai Wah Wu, Apr 03 2023

A029780 Numbers k such that every digit that appears in k also appears at least once in both k^2 and k^3.

Original entry on oeis.org

0, 1, 5, 6, 10, 11, 25, 50, 55, 60, 64, 66, 76, 99, 100, 101, 110, 111, 112, 115, 116, 125, 225, 250, 275, 288, 323, 376, 405, 499, 500, 501, 502, 525, 550, 555, 600, 602, 625, 640, 642, 644, 660, 666, 676, 724, 726, 733, 755, 760, 776, 777, 833
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[0,1000],Min[DigitCount[#^2,10,IntegerDigits[#]]]>0 && Min[ DigitCount[ #^3,10, IntegerDigits[#]]]>0&] (* Harvey P. Dale, Aug 12 2016 *)
  • Python
    from itertools import count, islice
    def A029780_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n:set(str(n)) <= set(str(m:=n**2)) & set(str(n*m)), count(max(startvalue,0)))
    A029780_list = list(islice(A029780_gen(),20)) # Chai Wah Wu, Apr 03 2023

Formula

A029772 intersect A029776. - Sean A. Irvine, Mar 04 2020

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

A045620 Numbers k such that digits of k^3 include digits of k^2.

Original entry on oeis.org

0, 1, 5, 10, 25, 50, 65, 100, 146, 250, 405, 500, 510, 521, 615, 650, 768, 945, 965, 1000, 1004, 1040, 1050, 1085, 1126, 1145, 1203, 1216, 1219, 1222, 1452, 1460, 1476, 1480, 1482, 1638, 1706, 1878, 2002, 2020, 2199, 2204, 2260, 2276, 2326, 2450, 2470, 2476
Offset: 1

Views

Author

Keywords

Examples

			a(8) = 146 because 146^3 = 3112136 includes all digits of 146^2 = 21316.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from collections import Counter
    def A045620_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda k:Counter(str(m:=k**2))<=Counter(str(k*m)),count(max(startvalue,0)))
    A045620_list = list(islice(A045620_gen(),20)) # Chai Wah Wu, Apr 03 2023

Extensions

Edited by N. J. A. Sloane, Nov 01 2007, at the suggestion of Alexander R. Povolotsky

A074913 Digits of n appear in n^2 and in n^3.

Original entry on oeis.org

0, 1, 5, 6, 10, 11, 25, 50, 60, 64, 76, 100, 101, 110, 125, 250, 275, 376, 405, 500, 501, 502, 600, 602, 625, 640, 642, 724, 726, 760, 946, 963, 976, 996, 1000, 1001, 1005, 1006, 1010, 1021, 1025, 1050, 1060, 1100, 1171, 1201, 1205, 1250, 1258, 1421, 1465
Offset: 0

Views

Author

Zak Seidov, Oct 01 2002

Keywords

Comments

From first 1000 n = 0 - 999, there are 34 such n, sharing their digits with n^2 and n^3. From first 100000 n = 0 - 999999, there are 1650 such n.

Examples

			n = 963, n^2 = 927369 -> 927(369), n^3 = 893056347 -> 8(9)305(63)47.
		

Crossrefs

Showing 1-7 of 7 results.