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-10 of 30 results. Next

A085545 Smaller of number pairs from A054038 which together use all ten digits once.

Original entry on oeis.org

35172, 57321, 58413, 59403
Offset: 1

Views

Author

Lekraj Beedassy, Jul 03 2003

Keywords

Examples

			57321 in A054038 has the companion 60984 and together use all ten digits once.
		

Crossrefs

Cf. A054038.

Extensions

Corrected by David Wasserman, Feb 03 2005

A029793 Numbers k such that k and k^2 have the same set of digits.

Original entry on oeis.org

0, 1, 10, 100, 1000, 4762, 4832, 10000, 10376, 10493, 11205, 12385, 12650, 14829, 22450, 23506, 24605, 26394, 34196, 36215, 47620, 48302, 48320, 49827, 64510, 68474, 71205, 72510, 72576, 74510, 74528, 79286, 79603, 79836, 94583, 94867, 96123, 98376
Offset: 1

Views

Author

Keywords

Comments

This sequence has density 1: almost all numbers k have all 10 digits in both k and k^2. - Franklin T. Adams-Watters, Jun 28 2011

Examples

			{0, 1, 3, 4, 9} = digits of a(10) = 10493 and of 10493^2 = 110103049;
{0, 1, 2, 5, 6} = digits of a(100) = 162025 and of 162025^2 = 26252100625;
{0, 1, 3, 4, 6, 7, 8} = digits of a(1000) = 1764380 and of 1764380^2 = 3113036784400;
{1, 2, 3, 4, 7, 8, 9} = digits of a(10000) = 14872239 and of 14872239^2 = 221183492873121.
		

Crossrefs

Programs

  • Haskell
    import Data.List (nub, sort)
    a029793 n = a029793_list !! (n-1)
    a029793_list = filter (\x -> digs x == digs (x^2)) [0..]
       where digs = sort . nub . show
    -- Reinhard Zumkeller, Jun 27 2011
    
  • Magma
    [ n: n in [0..10^5] | Set(Intseq(n)) eq Set(Intseq(n^2)) ];  // Bruno Berselli, Jun 28 2011
    
  • Maple
    seq(`if`(convert(convert(n,base,10),set) = convert(convert(n^2,base,10),set), n, NULL), n=0..100000); # Nathaniel Johnston, Jun 28 2011
  • Mathematica
    digitSet[n_] := Union[IntegerDigits[n]]; Select[Range[0, 99000], digitSet[#] == digitSet[#^2] &] (* Jayanta Basu, Jun 02 2013 *)
  • PARI
    isA029793(n)=Set(Vec(Str(n)))==Set(Vec(Str(n^2))) \\ Charles R Greathouse IV, Jun 28 2011
    
  • Scala
    (0L to 99999L).filter(n => n.toString.toCharArray.toSet == (n * n).toString.toCharArray.toSet) // Alonso del Arte, Jan 19 2020

A156977 Numbers n such that n^2 contains every decimal digit exactly once.

Original entry on oeis.org

32043, 32286, 33144, 35172, 35337, 35757, 35853, 37176, 37905, 38772, 39147, 39336, 40545, 42744, 43902, 44016, 45567, 45624, 46587, 48852, 49314, 49353, 50706, 53976, 54918, 55446, 55524, 55581, 55626, 56532, 57321, 58413, 58455, 58554, 59403, 60984
Offset: 1

Views

Author

Zak Seidov, Feb 20 2009

Keywords

Comments

There are exactly 87 such numbers, none of them being prime.
Since 0 + 1 +...+ 9 = 5*9, every pandigital number is divisible by 9, hence every term of this sequence is divisible by 3 and so cannot be a prime. - Giovanni Resta, Mar 19 2013 [Comment expanded by N. J. A. Sloane, Jan 15 2022]

Crossrefs

Programs

  • Magma
    [n: n in [Floor(Sqrt(1023456789))..Ceiling(Sqrt(9876543210))] | Set(Intseq(n^2)) eq {0..9}]; // Bruno Berselli, Mar 19 2013 (after Giovanni Resta)
  • Maple
    lim:=floor(sqrt(9876543210)): for n from floor(sqrt(1023456789)) to lim do d:=[op(convert(n^2, base, 10))]: pandig:=true: for k from 0 to 9 do if(numboccur(k, d)<>1)then pandig:=false: break: fi: od: if(pandig)then printf("%d, ",n): fi: od: # Nathaniel Johnston, Jun 22 2011
  • Mathematica
    Select[Range[Floor@Sqrt@1023456789, Ceiling@Sqrt@9876543210], Sort@IntegerDigits[#^2] == Range[0, 9] &] (* Giovanni Resta, Mar 19 2013 *)
    Select[Range[31992,99381,3],Union[DigitCount[#^2]]=={1}&] (* Harvey P. Dale, Jan 17 2022 *)

Formula

a(n) = sqrt(A036745(n)).

A054037 Numbers k such that k^2 contains exactly 9 different digits.

Original entry on oeis.org

10124, 10128, 10136, 10214, 10278, 11826, 12363, 12543, 12582, 12586, 13147, 13268, 13278, 13343, 13434, 13545, 13698, 14098, 14442, 14676, 14743, 14766, 15353, 15681, 15963, 16549, 16854, 17252, 17529, 17778, 17816, 18072, 19023, 19377, 19569, 19629, 20089
Offset: 1

Views

Author

Asher Auel, Feb 28 2000

Keywords

Comments

There are three prime numbers {13147, 20089, 21397} and corresponding squares {172843609, 403567921, 457831609} necessarily contain zero (otherwise n and n^2 are divisible by 3). - Zak Seidov, Jan 18 2012

Crossrefs

Programs

  • Maple
    f := []; for i from 0 to 200 do if nops({op(convert(i^2,base,10))})=9 then f := [op(f),i] fi; od; f;
  • Mathematica
    okQ[n_] := Module[{n2=n^2}, Max[DigitCount[n2,10]]==1 && IntegerLength[n2]==9]; Select[Range[20000], okQ]  (* Harvey P. Dale, Mar 20 2011 *)
  • Python
    from itertools import count, islice
    def agen(): yield from (k for k in count(10**4) if len(set(str(k*k)))==9)
    print(list(islice(agen(), 37))) # Michael S. Branicky, May 24 2022

A225218 Square numbers containing all the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.

Original entry on oeis.org

1026753849, 1042385796, 1098524736, 1237069584, 1248703569, 1278563049, 1285437609, 1382054976, 1436789025, 1503267984, 1532487609, 1547320896, 1643897025, 1827049536, 1927385604, 1937408256, 2076351489, 2081549376, 2170348569, 2386517904, 2431870596
Offset: 1

Views

Author

Reiner Moewald, May 02 2013

Keywords

Comments

The first term having a repeated digit is 10057482369. - Colin Barker, Jan 15 2014

Examples

			1026753849 is in the sequence because 1026753849 = 32043^2 and 1026753849 contains all ten digits 0, ..., 9.
		

Crossrefs

Supersequence of A036745.

Programs

  • Mathematica
    Select[#^2 &[Range[1000000]], Length[Union[IntegerDigits[#]]] == 10 &] (* Geoffrey Critzer, Jan 04 2015 *)
  • PARI
    s=[]; for(n=1, 100000, if(#vecsort(eval(Vec(Str(n^2))), , 8)==10, s=concat(s, n^2))); s \\ Colin Barker, Jan 15 2014
    
  • Python
    from itertools import count, islice
    def c(n): return len(set(str(n))) == 10
    def agen(): yield from (k*k for k in count(31622) if c(k*k))
    print(list(islice(agen(), 21))) # Michael S. Branicky, Dec 27 2022

Formula

a(n) = A054038(n)^2. - Colin Barker, Jan 15 2014

A054039 a(n)^2 is the least square to contain n different decimal digits.

Original entry on oeis.org

0, 4, 13, 32, 113, 322, 1017, 3206, 10124, 32043
Offset: 1

Views

Author

Asher Auel, Feb 28 2000

Keywords

Comments

It turns out that "...at least n..." and "...exactly n..." yield the same (and thus strictly increasing) sequence. - M. F. Hasler, Feb 02 2009

Examples

			13^2=169 is the first square to contain exactly 3 different digits; 322^2=103684 is the first square to contain exactly 6 different digits.
		

Crossrefs

Programs

  • PARI
    A054039(n,k=0) = { while( #Set(Vec(Str(k^2)))M. F. Hasler, Feb 02 2009 */

Extensions

Minor rewording, added comment, keywords "easy,full" and PARI code M. F. Hasler, Feb 02 2009

A071519 Numbers whose square is a zeroless pandigital number (i.e., use the digits 1 through 9 once).

Original entry on oeis.org

11826, 12363, 12543, 14676, 15681, 15963, 18072, 19023, 19377, 19569, 19629, 20316, 22887, 23019, 23178, 23439, 24237, 24276, 24441, 24807, 25059, 25572, 25941, 26409, 26733, 27129, 27273, 29034, 29106, 30384
Offset: 1

Views

Author

Lekraj Beedassy, Jun 20 2002

Keywords

Crossrefs

A subset of A054037.

Programs

  • Maple
    lim:=floor(sqrt(987654321)): for n from floor(sqrt(123456789)) to lim do d:=[op(convert(n^2, base, 10))]: pandig:=true: for k from 1 to 9 do if(numboccur(k, d)<>1)then pandig:=false: break: fi: od: if(pandig)then printf("%d, ", n): fi: od: # Nathaniel Johnston, Jun 22 2011
  • Mathematica
    Sqrt[#]&/@Select[FromDigits/@Permutations[Range[9]],IntegerQ[Sqrt[#]]&] (* Harvey P. Dale, Sep 23 2011 *)
    Select[Range[11112, 31427,3], DigitCount[#^2] == {1,1,1,1,1,1,1,1,1,0} &]  (* Zak Seidov, Jan 11 2012 *)
  • PARI
    A071519 = select( {is_A071519(n,L=[1..9])=vecsort(digits(n^2))==L}, [1e5\9..1e5\3]) \\ M. F. Hasler, Jun 28 2023

Formula

a(n) = sqrt(A036744(n)). - Zak Seidov, Jan 11 2012

A054031 Numbers whose square contains exactly 3 distinct digits.

Original entry on oeis.org

13, 14, 16, 17, 18, 19, 23, 24, 25, 27, 28, 29, 31, 34, 35, 39, 40, 41, 45, 46, 47, 50, 56, 58, 60, 62, 63, 65, 67, 68, 70, 75, 76, 77, 80, 81, 83, 85, 90, 91, 92, 94, 97, 101, 102, 107, 108, 110, 111, 119, 120, 121, 122, 129, 131, 141, 149, 150, 162, 165
Offset: 1

Views

Author

Asher Auel, Feb 29 2000

Keywords

Crossrefs

Programs

  • Maple
    f := []; for i from 0 to 200 do if nops({op(convert(i^2,base,10))})=3 then f := [op(f),i] fi; od; f;
  • Mathematica
    t = {}; n = -1; While[Length[t] < 50, n++; If[Length[Union[IntegerDigits[n^2]]] == 3, AppendTo[t, n]]] (* T. D. Noe, Apr 26 2013 *)
    Select[Range[200],Length[Union[IntegerDigits[#^2]]]==3&] (* Harvey P. Dale, Aug 17 2014 *)
  • PARI
    is(n)=#Set(digits(n^2))==3 \\ Charles R Greathouse IV, Feb 11 2017

Formula

A235718(n) = a(n)^2. - Giovanni Resta, Apr 28 2017

A054032 Numbers n such that n^2 contains exactly 4 different digits.

Original entry on oeis.org

32, 33, 36, 37, 42, 43, 44, 48, 49, 51, 52, 53, 54, 55, 57, 59, 61, 64, 66, 69, 71, 72, 73, 74, 78, 79, 82, 84, 86, 87, 89, 93, 95, 96, 98, 99, 103, 104, 105, 106, 112, 114, 115, 123, 125, 127, 130, 132, 135, 138, 139, 140, 143, 145, 146, 151, 155, 156, 157, 158
Offset: 1

Views

Author

Asher Auel, Feb 29 2000

Keywords

Crossrefs

Programs

  • Maple
    f := []; for i from 0 to 200 do if nops({op(convert(i^2,base,10))})=4 then f := [op(f),i] fi; od; f;
  • Mathematica
    t = {}; n = -1; While[Length[t] < 50, n++; If[Length[Union[IntegerDigits[n^2]]] == 4, AppendTo[t, n]]] (* T. D. Noe, Apr 26 2013 *)
  • PARI
    is(n)=#Set(digits(n^2))==4 \\ Charles R Greathouse IV, Feb 11 2017

A054033 Numbers n such that n^2 contains exactly 5 different digits.

Original entry on oeis.org

113, 116, 117, 118, 124, 126, 128, 133, 134, 136, 137, 142, 144, 147, 148, 152, 153, 154, 169, 172, 174, 175, 176, 178, 179, 181, 186, 189, 191, 193, 195, 196, 198, 199, 203, 209, 213, 214, 217, 219, 224, 226, 228, 232, 233, 248, 252, 259, 267, 268, 269
Offset: 1

Views

Author

Asher Auel, Feb 29 2000

Keywords

Comments

The first 66 terms are the only ones whose squares contain no repeated digits. - Charles R Greathouse IV, Feb 09 2015

Crossrefs

Programs

  • Maple
    f := []; for i from 0 to 200 do if nops({op(convert(i^2,base,10))})=5 then f := [op(f),i] fi; od; f;
  • Mathematica
    Select[Range[101,500],Count[DigitCount[#^2],0]==5&] (* Harvey P. Dale, Feb 08 2015 *)
  • PARI
    is(n)=#Set(digits(n^2))==5 \\ Charles R Greathouse IV, Feb 08 2015
Showing 1-10 of 30 results. Next