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.

A058411 Numbers k such that k^2 contains only digits {0,1,2}, not ending with zero.

Original entry on oeis.org

1, 11, 101, 149, 1001, 1011, 1101, 10001, 10011, 11001, 14499, 100001, 100011, 100101, 101001, 110001, 316261, 1000001, 1000011, 1000101, 1010001, 1010011, 1100001, 1100101, 10000001, 10000011, 10000101, 10001001, 10001011, 10001101, 10010001, 10100001, 10100011, 10110001
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2000

Keywords

Comments

Sporadic solutions (not consisting only of digits 0 and 1): a(4) = 149, a(11) = 14499, a(17) = 316261, a(209) = 4604367505011, a(715) = 10959977245460011, a(1015) = 110000500908955011, a(1665) = 10099510939154979751, ... Three infinite subsequences are given by numbers of the form 10...01, 10...011 and 110...01, but there are many others. - M. F. Hasler, Nov 14 2017
From Zhao Hui Du, Mar 12 2024: (Start)
Most terms have a special pattern in that they have only digits 0 and 1 and could be written as Sum_{h=0..t} 10^x(h), where 2x(h) and x(h1)+x(h2) are distinct and x(0)=0 for the nonzero ending constraint. The number of n-digit terms in the sequence in the special pattern is A143823(n) - 2*A143823(n-1) + A143823(n-2) for n >= 2.
Terms with only digits 0 and 1 but not in the special pattern exist as well. If we define f(x) = 1 + x^768 + x^960 + x^1008 + x^1020 + x^1028 + x^1040 + x^1088 + x^1280 + x^2048, f(x)^2 is a function with all nonzero coefficients 1,2,10 (the only coefficient of x^2048 is 10 and the coefficient of x^2049 is 0). So f(10) is in the sequence but not in the special pattern. (End)

Crossrefs

Cf. A058412 (the squares); A058412, ..., A058474 (other 3-digit combinations).
Cf. A063009, A066139. - Zak Seidov, Jul 01 2013

Programs

  • Magma
    [n: n in [1..2*10^8 by 2] | Set(Intseq(n^2)) subset [0,1,2]]; // Vincenzo Librandi, Feb 24 2016
  • Maple
    R[1]:= {1,9};
    for m from 2 to 10 do
      R[m]:= select(t -> max(convert(t^2 mod 10^m, base, 10)) <= 2, map(s -> seq(s + i*10^(m-1),i=0..9), R[m-1]))
    od:
    Res:= {seq(op(select(t -> t >= 10^(m-1) and max(convert(t^2,base,10)) <= 2, R[m])),m=1..10)}:
    sort(convert(Res,list)); # Robert Israel, Feb 23 2016
  • Mathematica
    Select[Range[10^6], And[Total@ Take[RotateRight@ DigitCount@ #, -7] == 0, Mod[#, 10] != 0] &[#^2] &] (* Michael De Vlieger, Nov 14 2017 *)
  • PARI
    isok(n)={ n%10 && vecmax(digits(n^2)) < 3 } \\ Michel Marcus, Feb 24 2016, edited by M. F. Hasler, Nov 14 2017
    
  • Python
    A058411_list = [i for i in range(10**6) if i % 10 and max(str(i**2)) < '3'] # Chai Wah Wu, Feb 23 2016
    

Formula

a(n) = sqrt(A058412(n)). - Zak Seidov, Jul 01 2013

Extensions

b-file corrected by Zhao Hui Du, Mar 07 2024

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

A063010 Carryless binary square of n; also Moser-de Bruijn sequence written in binary.

Original entry on oeis.org

0, 1, 100, 101, 10000, 10001, 10100, 10101, 1000000, 1000001, 1000100, 1000101, 1010000, 1010001, 1010100, 1010101, 100000000, 100000001, 100000100, 100000101, 100010000, 100010001, 100010100, 100010101, 101000000, 101000001
Offset: 0

Views

Author

Henry Bottomley, Jul 03 2001

Keywords

Comments

Numbers that are sums of distinct powers of 100. - David Wasserman, Feb 26 2008

Examples

			a(11)=1000101, since 11 in binary is 1011 and binary carryless sum of 1011000, 0, 10110 and 1011 is 1000101.
		

Crossrefs

Cf. Moser-de Bruijn sequence A000695, carryless decimal squares A059729, pre-carry binary squares A063009.

Programs

  • Mathematica
    With[{k = 100}, Map[FromDigits[#, k] &, Tuples[{0, 1}, 5]]] (* Michael De Vlieger, Oct 29 2022 *)
  • PARI
    a(n) = fromdigits(binary(n),100); \\ Ruud H.G. van Tol, Dec 05 2022
    
  • Python
    def A063010(n): return int(bin(int(bin(n)[2:],4))[2:]) # Chai Wah Wu, Apr 09 2025

Formula

a(n) = A062033(n)/10, i.e., with final zero removed.
a(n) = Sum_{k>=0} A030308(n,k)*A098608(k). - Philippe Deléham, Oct 15 2011
G.f.: (1/(1 - x))*Sum_{k>=0} 100^k*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Jun 04 2017

Extensions

More terms from David Wasserman, Feb 26 2008

A176923 Squares of A057148 taken as decimal numbers.

Original entry on oeis.org

0, 1, 121, 10201, 12321, 1002001, 1234321, 100020001, 102030201, 121242121, 123454321, 10000200001, 10221412201, 12102420121, 12345654321, 1000002000001, 1002003002001, 1020304030201, 1022325232201, 1210024200121, 1212225222121, 1232346432321, 1234567654321, 100000020000001, 100220141022001
Offset: 1

Views

Author

Jeremy Gardiner, Apr 29 2010

Keywords

Comments

See comment in A057148.

Crossrefs

Programs

  • Python
    def A176923(n):
        if n == 1: return 0
        a = 1<Chai Wah Wu, Jun 10 2024
Showing 1-4 of 4 results.