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-4 of 4 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

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

A178246 Numbers m such that all digits of m, including repetitions, occur among the digits of 2^m.

Original entry on oeis.org

6, 10, 14, 17, 21, 25, 27, 28, 29, 30, 31, 35, 36, 37, 39, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 56, 57, 58, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 94, 95, 96, 97, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 113, 114, 115, 116, 117
Offset: 1

Views

Author

Michel Lagneau, Dec 20 2010

Keywords

Comments

The sequence shows subsets of consecutive numbers.
153 is assumed to be the largest integer missing in this sequence. - Alois P. Heinz, Jan 28 2022

Examples

			17 is a term because the digits 1 and 7 are included in the number 2^17 = 131072;
3 is not a term because the digit 3 is not in the number 2^3 = 8.
33 is not a term because 2^33 = 8589934592 does not have 2 digits 3.
153 is not in the sequence because the digit 3 is not in the number 2^153 = 11417981541647679048466287755595961091061972992.
		

Crossrefs

Programs

  • Mathematica
    Reap[Do[a = DigitCount[2^n]; b = DigitCount[n]; If[Min[a-b] >= 0, Sow[n]], {n, 10^3}]][[2, 1]]
  • PARI
    isok(m) = {my(d=digits(m), dd=digits(2^m)); for (i=0, 9, if (#select(x->(x==i), d) > #select(x->(x==i), dd), return (0));); return(1);} \\ Michel Marcus, Jan 28 2022

Extensions

Name clarified by Michel Marcus, Jan 30 2022

A178223 Numbers n such that the digits of n are also digits of n! (counting multiplicity).

Original entry on oeis.org

1, 2, 4, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112
Offset: 1

Views

Author

Michel Lagneau, Dec 20 2010

Keywords

Examples

			23 is in the sequence because 2 and 3 are digits of 23! = 25852016738884976640000 ;
28 is not in the sequence because 2 is not a digit of 28! = 304888344611713860501504000000.
11 is not in the sequence because 11! = 39916800 contains only a single "1".
		

Crossrefs

Programs

  • Mathematica
    Reap[Do[a = DigitCount[n!]; b = DigitCount[n]; If[Min[a-b] >= 0, Sow[n]], {n, 1, 10^3}]][[2, 1]]
Showing 1-4 of 4 results.