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 14 results. Next

A136808 Numbers k such that k and k^2 use only the digits 0, 1 and 2.

Original entry on oeis.org

0, 1, 10, 11, 100, 101, 110, 1000, 1001, 1010, 1011, 1100, 1101, 10000, 10001, 10010, 10011, 10100, 10110, 11000, 11001, 11010, 100000, 100001, 100010, 100011, 100100, 100101, 100110, 101000, 101001, 101100, 110000, 110001, 110010, 110100, 1000000, 1000001, 1000010, 1000011, 1000100
Offset: 1

Views

Author

Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008

Keywords

Comments

Generated with DrScheme.
Subsequence of A136809, A136816, ..., A136836. - M. F. Hasler, Jan 24 2008
A278038(18) = 10101, A136827(294) = 10110001101, A136831(1276) = 101100010001101 resp. A136836(1262) = 101090009991101 are the first terms from where on these four sequences differ from the present one. - M. F. Hasler, Nov 15 2017
From Jovan Radenkovicc, Nov 15 2024: (Start)
A nonnegative integer n is in this sequence iff 10*n is also in this sequence.
Not a subsequence of A278038 (binary numbers without '111'). A counterexample is 10^2884 + 10^2880 + 10^2872 + 10^2857 + 10^2497 + 10^2426 + 10^2285 + 10^2004 + 10^1443 + 10^1442 + 10^1441 + 10^881 + 10^600 + 10^459 + 10^388 + 10^27 + 10^12 + 10^4 + 1. There are infinitely many counterexamples not divisible by 10. This counterexample follows from the fact that 111^2+2000*4+200*4=12321+8000+800=21121. In fact, every binary substring will eventually occur in this sequence. Also, if n is a term containing only the digits 0 and 1, then 10^k*n+1 and n+10^k are also in this sequence for any sufficiently large integer k. (End)

Examples

			101000100100001^2 = 10201020220210222010200200001.
		

Crossrefs

A subsequence of the binary numbers A007088.
Cf. A278038.
Cf. A136809, A136810, ..., A137147 for other digit combinations.
See also A058412 = A058411^2: squares having only digits {0,1,2}, A277946 = A277959^2 = squares whose largest digit is 2.

Programs

  • Maple
    isA136808 := proc(n) local ndgs,n2dgs ; ndgs := convert(convert(n,base,10),set) ; n2dgs := convert(convert(n^2,base,10),set) ; if ( (ndgs union n2dgs) minus {0,1,2} ) = {} then true ; else false ; fi ; end: LtonRev := proc(L) local i ; add(op(i,L)*10^(i-1),i=1..nops(L)) ; end: A007089 := proc(n) convert(n,base,3) ; LtonRev(%) ; end: n := 1: for i from 0 do n3 := A007089(i) ; if isA136808(n3) then printf("%d %d ",n,n3) ; n := n+1 ; fi ; od: # R. J. Mathar, Jan 24 2008
  • Mathematica
    Select[FromDigits/@Tuples[{0,1},7],Union[Take[DigitCount[#^2],{3,9}]]=={0}&] (* Harvey P. Dale, May 29 2013 *)
  • PARI
    for(n=1,999,vecmax(digits((N=fromdigits(binary(n),10))^2))<3 && print1(N",")) \\ M. F. Hasler, Nov 15 2017

A277946 Squares whose largest decimal digit is 2.

Original entry on oeis.org

121, 10201, 12100, 22201, 1002001, 1020100, 1022121, 1210000, 1212201, 2220100, 100020001, 100200100, 100220121, 102010000, 102212100, 121000000, 121022001, 121220100, 210221001, 222010000, 10000200001, 10002000100, 10002200121, 10020010000, 10020210201
Offset: 1

Views

Author

Colin Barker, Nov 05 2016

Keywords

Comments

A subsequence of A000290.
From Robert Israel, Nov 14 2016: (Start)
If n is a term, then so is 100*n.
The first term with an even number of digits is a(36) = 100021020121.
The first term with an even number of digits that is not of the form a(36)*100^k has at least 24 digits.
(End)

Crossrefs

Programs

  • Magma
    [n^2: n in [1..1000000] | Maximum(Intseq(n^2)) eq 2]; // Vincenzo Librandi, Nov 06 2016
  • Maple
    res:= NULL: B:= [1,2]:
    for m from 1 to 10 do
      for q in B do
        for x from ceil(sqrt(10^m*q)) to floor(sqrt(10^m*q + 2/9*(10^m-1))) do
          if max(convert(x^2,base,10)) = 2 then res:= res, x^2 fi
      od od:
      for q in B do
         for x from ceil(sqrt(10^(m+1)*q)) to floor(sqrt(10^(m+1)*q + 2/9*(10^(m+1)-1))) do
           if max(convert(x^2,base,10)) = 2 then res:= res, x^2 fi
      od od:
      if m < 10 then B:= map(t -> (10*t,10*t+1,10*t+2),B) fi;
    od:
    res; # Robert Israel, Nov 14 2016
  • Mathematica
    fQ[n_] := Union[ IntegerDigits[ n^2]][[-1]] == 2; Select[ Range@100500, fQ]^2 (* Robert G. Wilson v, Nov 06 2016 *)
  • PARI
    L=List(); for(n=1, 10000, if(vecmax(digits(n^2))==2, listput(L, n^2))); Vec(L)
    \\ See A277959 for more efficient code. - M. F. Hasler, Nov 16 2017
    

Formula

a(n) = A277959(n)^2. Intersection of A000290 and A277964. - M. F. Hasler, Nov 15 2017

A277961 Numbers n such that 4 is the largest decimal digit of n^2.

Original entry on oeis.org

2, 12, 18, 20, 21, 32, 38, 48, 49, 102, 120, 152, 179, 180, 182, 200, 201, 210, 318, 320, 321, 332, 338, 348, 362, 380, 451, 452, 462, 480, 482, 490, 548, 549, 649, 1002, 1012, 1020, 1021, 1049, 1102, 1111, 1188, 1200, 1201, 1429, 1488, 1498, 1518, 1520
Offset: 1

Views

Author

Colin Barker, Nov 06 2016

Keywords

Comments

The actual squares are listed in A277948. - M. F. Hasler, Nov 12 2017
Includes 2*10^n+10^m for all n <> m. - Robert Israel, Nov 13 2017
For any term of q digits, the first m digits don't exceed (2 * 10^m - 2) / 3 = 666..66 (m 6's) for 1 <= m <= q. - David A. Corneth, Nov 13 2017
A term a(n) is in the sequence if and only if a(n)*10^k is in the sequence, for all k >= 0. If a(n) = (x*10^k + y)*10^m with 2xy < 10^k, then (y*10^k+x)*10^m' is also in the sequence, for all m'. - M. F. Hasler, Nov 13 2017

Crossrefs

Programs

  • Maple
    select(n -> max(convert(n^2,base,10))=4, [$1..10000]); # Robert Israel, Nov 13 2017
  • PARI
    L=List(); for(n=1, 10000, if(vecmax(digits(n^2))==4, listput(L, n))); Vec(L)

Formula

a(n) = sqrt(A277948(n)), where sqrt = A000196 or A000194 or A003059. - M. F. Hasler, Nov 12 2017

A137147 Numbers k such that k and k^2 use only the digits 5, 6, 7, 8 and 9.

Original entry on oeis.org

76, 87, 766, 887, 7666, 8887, 9786, 76587, 76666, 87576, 759576, 766666, 869866, 869867, 886886, 888587, 988866, 7666666, 8766867, 8885887, 76587576, 76666666, 76789686, 86998666, 87565786, 87685676, 88766867, 97759786, 97957576, 766666666, 875765766, 886885887, 887579686, 977699687
Offset: 1

Views

Author

Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008

Keywords

Comments

Generated with DrScheme.

Examples

			989878759589576^2 = 979859958686597599779967859776.
		

Crossrefs

Cf. A136808, A136809, ..., A137146 for other digit combinations.
Cf. A000290 (the squares); A027675, A058411, ..., A058474 (3-digit combinations).
Cf. A277959, A277960, A277961, A295005, ..., A295009 (squares with largest digit = 2, 3, 4, 5, ..., 9).

A030175 When squared gives number composed of digits {1,2,3}.

Original entry on oeis.org

1, 11, 111, 36361, 363639, 461761, 3636361, 34815389, 362397739, 176412364139, 57637950363639, 3497458093147239, 56843832676142723489, 557963558954625926861
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A136808, A136809, ..., A137147: n and n^2 have digits {...}.
Cf. A277959^2 = A277946 and A277960^2 = A277947: squares whose largest digit is 2 resp. 3.

Programs

  • Mathematica
    Do[ If[ Union[ Join[{1, 2, 3}, IntegerDigits[n^2] ] ] == {1, 2, 3}, Print[n] ], {n, 0, 10^9}]
  • PARI
    lista(nn) = for(n=1, nn, if(setminus(vecsort(digits(n^2), , 8), [1, 2, 3])==[], print1(n, ", "))) \\ Iain Fox, Nov 16 2017

Formula

a(n)^2 = A030174(n). - M. F. Hasler, Nov 16 2017

Extensions

More terms from Patrick De Geest, Mar 01 2000
More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 14 2005
Offset corrected by Iain Fox, Nov 16 2017

A277960 Numbers n such that 3 is the largest decimal digit of n^2.

Original entry on oeis.org

111, 351, 361, 1110, 1149, 1761, 3510, 3610, 10101, 10111, 10149, 11100, 11101, 11490, 17610, 35100, 36100, 36361, 36501, 45861, 100111, 100649, 101010, 101011, 101110, 101149, 101490, 110101, 111000, 111001, 111010, 114111, 114499, 114900, 176100, 176361
Offset: 1

Views

Author

Colin Barker, Nov 06 2016

Keywords

Crossrefs

Programs

  • PARI
    L=List(); for(n=1, 10000, if(vecmax(digits(n^2))==3, listput(L, n))); Vec(L)

A295005 Numbers n such that the largest digit of n^2 is 5.

Original entry on oeis.org

5, 15, 35, 39, 45, 50, 55, 65, 71, 105, 112, 115, 145, 150, 155, 185, 188, 205, 211, 229, 235, 335, 350, 365, 368, 388, 389, 390, 450, 461, 485, 495, 500, 501, 502, 505, 550, 579, 585, 595, 635, 650, 652, 665, 671, 710, 711, 715, 718, 729, 735, 745, 1005, 1015, 1050
Offset: 1

Views

Author

M. F. Hasler, Nov 12 2017

Keywords

Examples

			39 is in this sequence because 39^2 = 1521 has 5 as largest digit.
		

Crossrefs

Cf. A295015 (the corresponding squares), A277959 .. A277961 (same for digit 2 .. 4), A295006 .. A295009 (same for digit 6 .. 9).
Cf. A000290 (the squares).

Programs

  • Mathematica
    Select[Sqrt[ #]&/@(FromDigits/@Select[Tuples[ Range[ 0,5],7],Max[#] == 5&]),IntegerQ] (* Harvey P. Dale, Sep 23 2021 *)
  • PARI
    select( is_A295005(n)=n&&vecmax(digits(n^2))==5 , [0..999]) \\ The "n&&" avoids an error message for n=0.
    
  • Python
    def aupto(limit):
      alst = []
      for k in range(1, limit+1):
        if max(str(k*k)) == "5": alst.append(k)
      return alst
    print(aupto(1050)) # Michael S. Branicky, May 15 2021

Formula

a(n) = sqrt(A295015(n)), where sqrt = A000196 or A000194 or A003059.

A295009 Numbers k such that the largest digit of k^2 is 9.

Original entry on oeis.org

3, 7, 13, 14, 17, 23, 27, 30, 31, 33, 36, 37, 43, 44, 47, 53, 54, 57, 63, 64, 67, 70, 73, 77, 83, 86, 87, 89, 93, 95, 96, 97, 98, 99, 103, 107, 113, 114, 117, 118, 123, 127, 130, 133, 134, 136, 137, 138, 139, 140, 141, 143, 147, 148, 153, 157, 158, 161, 163, 164, 167, 170, 171
Offset: 1

Views

Author

M. F. Hasler, Nov 12 2017

Keywords

Examples

			23 is in this sequence because 23^2 = 529 has 9 as largest digit.
		

Crossrefs

Cf. A295019 (the corresponding squares), A277959 .. A277961 (same for digit 2 .. 4), A295005 .. A295008 (same for digit 5 .. 8).
Cf. A000290 (the squares).

Programs

  • PARI
    select( is_A295009(n)=n&&vecmax(digits(n^2))==9 , [0..999]) \\ The "n&&" avoids an error message for n=0.

Formula

a(n) = sqrt(A295019(n)), where sqrt = A000196 or A000194 or A003059.

A058412 Squares composed of digits {0,1,2}, not ending with zero.

Original entry on oeis.org

1, 121, 10201, 22201, 1002001, 1022121, 1212201, 100020001, 100220121, 121022001, 210221001, 10000200001, 10002200121, 10020210201, 10201202001, 12100220001, 100021020121, 1000002000001, 1000022000121, 1000202010201
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2000

Keywords

Comments

All terms but the first one have their largest digit equal to 2, cf. A277946 = A277959^2. - M. F. Hasler, Nov 15 2017

Crossrefs

Cf. A058411.
Cf. A063009, A066139. - Zak Seidov, Jul 01 2013
Cf. A136808, A136809 and A136810, ..., A137147 for other digit combinations.
See also A277946 = A277959^2 = squares whose largest digit is 2.
The first 1261 terms are also a subsequence of A278038 (binary numbers without '111'), in turn a subsequence of the binary numbers A007088.

Programs

Formula

a(n) = A058411(n)^2. - Zak Seidov, Jul 01 2013

A295006 Numbers n such that the largest digit of n^2 is 6.

Original entry on oeis.org

4, 6, 8, 16, 19, 25, 34, 40, 46, 51, 56, 58, 60, 66, 68, 75, 79, 80, 81, 106, 108, 116, 119, 121, 125, 129, 142, 146, 156, 160, 162, 175, 190, 204, 206, 208, 215, 216, 225, 231, 238, 245, 246, 248, 249, 250, 251, 252, 254, 255, 256, 258, 325, 334, 340, 354, 355, 369, 375, 379
Offset: 1

Views

Author

M. F. Hasler, Nov 12 2017

Keywords

Examples

			19 is in this sequence because 19^2 = 361 has 6 as largest digit.
		

Crossrefs

Cf. A295016 (the corresponding squares), A277959, A277960, A277961, A295005 .. A295009 (analog for digits 2 through 9), A294996 (analog for cubes).
Cf. A000290 (the squares).

Programs

  • Mathematica
    Select[Range[400],Max[IntegerDigits[#^2]]==6&] (* Harvey P. Dale, Mar 30 2024 *)
  • PARI
    select( is_A295006(n)=n&&vecmax(digits(n^2))==6 , [0..999]) \\ The "n&&" avoids an error message for n=0.

Formula

a(n) = sqrt(A295016(n)), where sqrt = A000196 or A000194 or A003059.
Showing 1-10 of 14 results. Next