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

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

Original entry on oeis.org

0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 10000, 10001, 10010, 10011, 10100, 10101, 10110, 10111, 11000, 11001, 11010, 11100, 11101, 100000, 100001, 100010, 100011, 100100, 100101, 100110, 100111, 101000, 101001, 101010, 101011, 101100, 101110, 110000, 110001, 110010, 110100, 110101, 111000, 111001, 111010
Offset: 1

Views

Author

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

Keywords

Comments

Generated with "DrScheme".
Subsequence of A136810-A136815. - M. F. Hasler, Jan 24 2008
From M. F. Hasler, Nov 03 2020: (Start)
A136813(144) = 31733311 is the first term of that sequence which is not in this sequence. All others among A136810-A136815 differ much earlier.
If a(n) is a term then so is 10*a(n). Conjecture: the sequence contains only "binary numbers" (digits 0 or 1) having no more than three 1's in a row, and not more than one run of two or more consecutive 1's. (But not all such numbers, since 101101 for example is not in the sequence.) (End)
Here is a counterexample with two instances of two consecutive ones, i.e., two non-overlapping occurrences of the substring 11: 110010000010100001010000010011^2 = 12102200102222202222322212223022221222322220222220100220121. - Michael S. Branicky, Nov 04 2020
One cannot test candidates digit-by-digit from the right. Specifically, a suffix of the valid counterexample above is invalid: 10100001010000010011^2 = 102010020402001222322220222220100220121. - Michael S. Branicky, Nov 05 2020
With respect to the conjectures and comment above, only digits 0 and 1 occur and no 1111's occur in the first 83990 terms (all with <= 25 digits). These were generated incrementally from the right based on partial screening (see Python program). - Michael S. Branicky, Jul 07 2022

Examples

			111^2 = 12321,
11101^2 = 123232201, and
101011^2 = 10203222121,
111001^2 = 12321222001, so 111, 11101, 101011 and 111001 are in the sequence, but:
110011^2 = 12102420121, so 110011 is not in the sequence; also
1100011^2 = 1210024200121, so 1100011 is not in the sequence, and
1010101^2 = 1020304030201, so 1010101 is not in the sequence; but
1110001^2 = 1232102220001, so 1110001 is in the sequence; also
1010100100001^2 = 1020302212022030200200001.
		

Crossrefs

Cf. A007088 (binary numbers), A136808 (subsequence: only 0, 1, 2), A136810, A136811, A136812, A136813, A136814, A136815.

Programs

  • Mathematica
    Select[Range[0,200000],And@@(ContainsAll[{0,1,2,3},Union@IntegerDigits@#]&/@{#,#^2})&] (* Giorgos Kalogeropoulos, May 21 2021 *)
    With[{c={0,1,2,3}},Select[FromDigits/@Tuples[c,6],SubsetQ[c,IntegerDigits[ #^2]]&]] (* Harvey P. Dale, Jun 01 2021 *)
  • PARI
    select( {is_A136809(n,o(n)=vecmax(digits(n))<4)=o(n^2)&&o(n)}, [fromdigits(binary(n))|n<-[0..99]]) \\ M. F. Hasler, Nov 03 2020
    
  • Python
    from itertools import count, islice
    def agen(only="0123"):
        digset, valid = set(only), set(only)
        for e in count(1):
            found, newvalid = set(), set()
            for tstr in valid:
                t = int(tstr)
                if (tstr == "0" or tstr[0] != "0") and set(str(t**2)) <= digset:
                    found.add(t)
                for d in digset:
                    dtstr = d + tstr
                    dt = int(dtstr)
                    remstr = str(dt**2)[-e:]
                    if set(remstr) <= digset:
                        newvalid.add(dtstr)
            valid = newvalid
            yield from sorted(found)
    print(list(islice(agen(), 50))) # Michael S. Branicky, Jul 07 2022

A277959 Numbers k such that 2 is the largest decimal digit of k^2.

Original entry on oeis.org

11, 101, 110, 149, 1001, 1010, 1011, 1100, 1101, 1490, 10001, 10010, 10011, 10100, 10110, 11000, 11001, 11010, 14499, 14900, 100001, 100010, 100011, 100100, 100101, 100110, 101000, 101001, 101100, 110000, 110001, 110010, 110100, 144990, 149000, 316261
Offset: 1

Views

Author

Colin Barker, Nov 06 2016

Keywords

Comments

The terms > 1 of A058411 can be considered as primitive elements of this sequence, obtained by multiplying those by powers of 10 (cf. formula). These terms of A058411 have at least 2 nonzero digits, and therefore their square has at least one digit 2. - M. F. Hasler, Nov 15 2017

Crossrefs

Cf. A277946 (the squares); A277960, A277961, A295005, ..., A295009 (analog for largest digit 3, 4, 5, ..., 9).
Cf. A058411, A058412 and A058413, ..., A058474. (Similar but no trailing 0's allowed.)
Cf. A136808 and A136809, ..., A137147 for other digit combinations. (Numbers must satisfy the same restriction as their squares.)

Programs

  • Mathematica
    Select[Range[4*10^5], And[#[[2]] > 0, Union@ Take[RotateLeft[#, 2], 7] == {0}] &@ DigitCount[#^2] &] (* Michael De Vlieger, Nov 16 2017 *)
  • PARI
    L=List(); for(n=1, 10000, if(vecmax(digits(n^2))==2, listput(L, n))); Vec(L)
    
  • PARI
    A277959(LIM=1e15, L=List(), N=1)={while(LIM>N=next_A058411(N),my(t=N); until(LIMM. F. Hasler, Nov 15 2017

Formula

Equals (A058411 \ {1})*A011557, where A011557 = { 10^k; k >= 0 }. - M. F. Hasler, Nov 16 2017

Extensions

Edited by M. F. Hasler, Nov 16 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).

A277948 Squares whose largest decimal digit is 4.

Original entry on oeis.org

4, 144, 324, 400, 441, 1024, 1444, 2304, 2401, 10404, 14400, 23104, 32041, 32400, 33124, 40000, 40401, 44100, 101124, 102400, 103041, 110224, 114244, 121104, 131044, 144400, 203401, 204304, 213444, 230400, 232324, 240100, 300304, 301401, 421201, 1004004
Offset: 1

Views

Author

Colin Barker, Nov 05 2016

Keywords

Comments

A subsequence of A158082, in turn a subsequence of A000290.

Crossrefs

Cf. A000290 (the squares).
Cf. A277961 (square roots of these terms).
Cf. A277946, A277947, A295015, ..., A295019 (analog for largest digit = 2, 3, 5, ..., 9).
Cf. A058412, A058411, ..., A058474 and A136808, A136809, ..., A137147 for other restrictions on digits of squares.

Programs

  • Magma
    [n^2: n in [1..1000000] | Maximum(Intseq(n^2)) eq 4]; // Vincenzo Librandi, Nov 06 2016
  • Mathematica
    Select[Range[1100]^2,Max[IntegerDigits[#]]==4&] (* Harvey P. Dale, Jul 01 2017 *)
  • PARI
    L=List(); for(n=1, 10000, if(vecmax(digits(n^2))==4, listput(L, n^2))); Vec(L)
    

Formula

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

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

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

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

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.
Comparison of b-files indicates that the first difference from A136831 is at the 1262nd entry. - R. J. Mathar Apr 29 2008
More precisely, A278038(18) = 10101, A136827(294) = 10110001101 resp. A136808(1262) = A136831(1262) = 101100000000000 are the first terms from where on these four sequences differ from the present one; a(1262) = 101090009991101 is also the first term containing a digit > 1. - M. F. Hasler, Nov 15 2017

Examples

			101090009991101^2 = 10219190120000900002099192201.
		

Crossrefs

Cf. A136808, 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.
The first 1261 terms are also a subsequence of A278038 (binary numbers without '111'), in turn a subsequence of the binary numbers A007088.

Programs

  • Mathematica
    With[{c={0,1,2,9}},Select[FromDigits/@Tuples[c,7],SubsetQ[c,IntegerDigits[#^2]]&]] (* Harvey P. Dale, Feb 11 2024 *)

A257085 Numbers n such that the decimal expansions of both n and n^2 only use the digits 0..6.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 10, 11, 12, 15, 16, 20, 21, 25, 32, 34, 35, 40, 45, 46, 50, 51, 55, 56, 60, 65, 66, 100, 101, 102, 105, 106, 110, 111, 112, 115, 116, 120, 121, 125, 142, 145, 146, 150, 152, 155, 156, 160, 162, 200, 201, 204, 205, 206, 210, 211, 215, 216, 225, 231, 235, 245, 246, 250, 251, 252, 254, 255, 256
Offset: 1

Views

Author

Danny Rorabaugh, Apr 15 2015

Keywords

Examples

			116 is in the list because 116 and 116^2 = 13456 do not use the digits 7, 8 or 9.
182 is not in the list because it uses the digit 8 (even though 182^2 = 33124 would be fine).
253 is not in the list because 253^2 = 6409 uses the digit 9.
		

Crossrefs

Cf. A178501 (0..1), A136808(0..2), A136809(0..3), A136810 (0..4), A257086 (0..5).

Programs

  • Mathematica
    Select[Range@ 256, Total@ Take[DigitCount[#], {7, 9}] == 0 && Total@ Take[DigitCount[#^2], {7, 9}] == 0 &] (* Michael De Vlieger, Apr 17 2015 *)
  • PARI
    isok(n) = ((vecmax(digits(n)) <= 6) && (vecmax(digits(n^2)) <= 6)) || (n==0); \\ Michel Marcus, Feb 02 2016

A257086 Numbers n such that the decimal expansions of both n and n^2 only use the digits 0..5.

Original entry on oeis.org

0, 1, 2, 5, 10, 11, 12, 15, 20, 21, 32, 35, 45, 50, 55, 100, 101, 102, 105, 110, 111, 112, 115, 120, 145, 150, 152, 155, 200, 201, 205, 210, 211, 235, 320, 321, 332, 335, 350, 351, 450, 451, 452, 500, 501, 502, 505, 550, 1000, 1001, 1002, 1005, 1010, 1011, 1012, 1015, 1020, 1021, 1050, 1055, 1100
Offset: 1

Views

Author

Danny Rorabaugh, Apr 15 2015

Keywords

Examples

			115 is in the list because 115 and 115^2 = 13225 do not use the digits 6, 7, 8, or 9.
121 is not in the list because 121^2 = 14641 uses the digit 6.
149 is not in the list because it uses the digit 9 (even though 149^2 = 22201 would be okay).
		

Crossrefs

Cf. A178501 (0..1), A136808(0..2), A136809(0..3), A136810 (0..4), A257085 (0..6).

Programs

  • Mathematica
    Select[Range@ 1100, Total@ Take[DigitCount[#], {6, 9}] == 0 && Total@ Take[DigitCount[#^2], {6, 9}] == 0 &] (* Michael De Vlieger, Apr 17 2015 *)

A136812 Numbers k such that k and k^2 use only the digits 0, 1, 2, 3 and 6.

Original entry on oeis.org

0, 1, 6, 10, 11, 60, 100, 101, 106, 110, 111, 361, 600, 601, 1000, 1001, 1006, 1010, 1011, 1060, 1100, 1101, 1106, 1110, 1631, 3606, 3610, 6000, 6001, 6010, 6011, 10000, 10001, 10006, 10010, 10011, 10060, 10100, 10101, 10106, 10110, 10111, 10301, 10306, 10600, 11000, 11001, 11006, 11010, 11060, 11100, 11101, 16310, 32111, 36060, 36100, 36361
Offset: 1

Views

Author

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

Keywords

Comments

Generated with DrScheme.

Examples

			1031316261^2 = 1063613230203020121.
		

Crossrefs

Cf. A136808, ..., A137147.
Showing 1-10 of 13 results. Next