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

A046827 Numbers k such that k^2 contains all the digits of k with the same or higher multiplicity.

Original entry on oeis.org

0, 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
Offset: 1

Views

Author

Keywords

Comments

10^n is a term for all n. - Amarnath Murthy, Aug 03 2005

Examples

			27 is a term as 27^2 = 729 contains 2 and 7.
255 is a term as 255^2 = 65025 which contains the digits 2,5,5. 502 is a term as 502^2 = 252004 which contains 5, 0, 2.
		

Crossrefs

Cf. A064827 (essentially the same).

Programs

  • Maple
    isA046827 := proc(n) local dgsn,dgsnsq,multsn,multsn2,o,i ;
    dgsn := sort(convert(n,base,10)) ;
    dgsnsq := sort(convert(n^2,base,10)) ;
    multsn := [seq(0,i=0..9) ] ;
    multsn2 := [seq(0,i=0..9) ] ; for i from 1 to nops(dgsn) do o := op(1+op(i,dgsn),multsn) ; multsn := subsop( 1+op(i,dgsn)=o+1,multsn ) ; od: for i from 1 to nops(dgsnsq) do o := op(1+op(i,dgsnsq),multsn2) ; multsn2 := subsop( 1+op(i,dgsnsq)=o+1,multsn2 ) ; od: for i from 1 to 10 do if op(i,multsn2) < op(i,multsn) then RETURN(false) ; fi ; od: RETURN(true) ; end: for n from 1 to 700 do if isA046827(n) then printf("%d,",n) ; fi ; od; # R. J. Mathar, Feb 11 2008
  • Mathematica
    Join[{0}, Select[Range[525], Count[Table[DigitCount[#^2, 10, k] - DigitCount[#, 10, k], {k, Union[IntegerDigits[#]]}], ?Negative] == 0 &]] (* _Jayanta Basu, Jun 29 2013 *)
  • Python
    from itertools import count, islice
    from collections import Counter
    def A046827_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda k:Counter(str(k))<=Counter(str(k**2)),count(max(startvalue,0)))
    A046827_list = list(islice(A046827_gen(),20)) # Chai Wah Wu, Apr 03 2023

Extensions

Edited by N. J. A. Sloane, Aug 23 2008 at the suggestion of R. J. Mathar

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

A326418 Nonnegative numbers k such that, in decimal representation, the subsequence of digits of k^2 occupying an odd position is equal to the digits of k.

Original entry on oeis.org

0, 1, 5, 6, 10, 11, 50, 60, 76, 100, 105, 110, 500, 501, 505, 506, 600, 605, 756, 760, 826, 1000, 1001, 1050, 1100, 5000, 5010, 5050, 5060, 5941, 6000, 6050, 7560, 7600, 8260, 10000, 10005, 10010, 10500, 10505, 11000, 12731
Offset: 1

Views

Author

Keywords

Comments

If k is in the sequence then so is 10*k. - David A. Corneth, Sep 29 2019
No term starts with the digit 2. - Chai Wah Wu, Apr 04 2023

Examples

			5^2 = 25, whose first digit is 5, hence 5 is a term of the sequence.
11^2 = 121, whose first and third digit are (1, 1), hence 11 is a term of the sequence.
756^2 = 571536, whose digits in odd positions - starting from the least significant one - are (7, 5, 6), hence 756 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 13000], Reverse@ #[[-Range[1, Length@ #, 2]]] &@ IntegerDigits[#^2] === IntegerDigits[#] &] (* Michael De Vlieger, Oct 06 2019 *)
  • PARI
    isok(n) = my(d=Vecrev(digits(n^2))); fromdigits(Vecrev(vector((#d+1)\2, k, d[2*k-1]))) == n; \\ Michel Marcus, Oct 01 2019
    
  • Python
    def ok(n): s = str(n*n); return n == int("".join(s[1-len(s)%2::2]))
    print(list(filter(ok, range(13000)))) # Michael S. Branicky, Sep 10 2021

A029773 Squares k^2 in which the digits of k appear.

Original entry on oeis.org

0, 1, 25, 36, 100, 121, 625, 729, 2500, 3025, 3600, 3969, 4096, 4356, 5476, 5776, 9025, 9216, 9801, 10000, 10201, 11025, 12100, 12321, 12544, 13225, 13456, 15625, 19321, 20164, 39601, 42025, 44521, 49284, 50625, 53824, 62500, 65025
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A029772.

Programs

  • Mathematica
    Select[Range[0,300]^2,SubsetQ[IntegerDigits[#],IntegerDigits[Sqrt[#]]]&] (* Harvey P. Dale, Jan 18 2015 *)

Formula

a(n) = A029772(n)^2. - Michel Marcus, Aug 29 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
Showing 1-5 of 5 results.