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.

A136491 Complement of A136490.

Original entry on oeis.org

11, 13, 19, 21, 22, 25, 26, 27, 35, 37, 38, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 59, 61, 67, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 94, 95, 97, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 01 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 150], StringFreeQ[IntegerString[#^3, 2], IntegerString[#, 2]] &] (* Paolo Xausa, Apr 05 2024 *)

A018826 Numbers n such that n is a substring of its square when both are written in base 2.

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 27, 32, 41, 54, 64, 82, 108, 128, 145, 164, 165, 256, 283, 290, 328, 487, 512, 545, 566, 580, 974, 1024, 1090, 1132, 1160, 1773, 1948, 2048, 2113, 2180, 2320, 2701, 3546, 3896, 4096, 4226, 4261, 4360, 4757, 5402, 7092, 7625, 8079, 8192
Offset: 1

Views

Author

Keywords

Comments

Complement of A136492. - Reinhard Zumkeller, Jan 01 2008
A136510(a(n)) = 2 for n>0. - Reinhard Zumkeller, Jan 03 2008
From Robert Israel, Jul 11 2018: (Start)
Contains A000079.
If x satisfies x^2 == 8*x + 1 (mod 2^m) and 0 < x < 2^(m-3) then x is in the sequence. Note that x^2 == 8*x + 1 has 4 solutions mod 2^m for m >= 3. Terms obtained in this way include 27, 283, 1773, 9965, 55579, 206573, .... (End)

Examples

			27 in binary is 11011 and 27^2 = 729 in binary is 1011011001 which has substring 11011. - _Michael Somos_, Mar 16 2015
		

Crossrefs

Cf. A018827 (base 3), A018828 (base 4), A018829 (base 5), A018830 (base 6), A018831 (base 7), A018832 (base 8), A018833 (base 9), A018834 (base 10).

Programs

  • Maple
    filter:= proc(n) local S,S2;
        S:= convert(convert(n,binary),string);
        S2:= convert(convert(n^2,binary),string);
        StringTools:-Search(S,S2)<>0
    end proc:
    select(filter, [$0..10000]); # Robert Israel, Jul 11 2018
  • Mathematica
    Select[Range[0, 8192], {} != SequencePosition @@ IntegerDigits[{#^2, #}, 2] &] (* Giovanni Resta, Aug 20 2018 *)
    Select[Range[0,10000],SequenceCount[IntegerDigits[#^2,2],IntegerDigits[#,2]]>0&] (* Harvey P. Dale, May 03 2022 *)
  • PARI
    issub(b, bs, k) = {for (i=1, #b, if (b[i] != bs[i+k-1], return (0));); return (1);}
    a076141(n) = {if (n, b = binary(n), b = [0]); if (n, bs = binary(n^2), bs = [0]); sum(k=1, #bs - #b +1, issub(b, bs, k));}
    lista(nn) = for (n=0, nn, if (a076141(n) == 1, print1(n, ", "))); \\ Michel Marcus, Mar 15 2015
    
  • Python
    def ok(n): return bin(n)[2:] in bin(n**2)[2:]
    print([k for k in range(9999) if ok(k)]) # Michael S. Branicky, Apr 04 2024

A029942 Numbers k such that the decimal expansion of k^3 contains k as a substring.

Original entry on oeis.org

0, 1, 4, 5, 6, 9, 10, 24, 25, 32, 40, 49, 50, 51, 56, 60, 75, 76, 90, 99, 100, 125, 240, 249, 250, 251, 375, 376, 400, 490, 499, 500, 501, 510, 600, 624, 625, 749, 750, 751, 760, 782, 875, 900, 990, 999, 1000, 1249, 1250, 2400, 2490, 2500, 2510
Offset: 1

Views

Author

Keywords

Examples

			24 is a term as 24^3 = 13824 contains 24 as a substring.
250 is a term as 250^3 = 1562500 contains 250 as a substring.
6^3 = 21_6, 782^3 = 4_782_11768.
		

Crossrefs

Cf. A018834 (squares), A075904 (4th powers), A075905 (5th powers), A136490 (base 2).
Cf. A000578. Supersequence of A029943.

Programs

  • Haskell
    import Data.List (isInfixOf)
    a029942 n = a029942_list !! (n-1)
    a029942_list = [x | x <- [0..], show x `isInfixOf` show (x^3)]
    -- Reinhard Zumkeller, Feb 29 2012
  • Mathematica
    n3ssQ[n_]:=Module[{idn=IntegerDigits[n],idn3=Partition[ IntegerDigits[ n^3], IntegerLength[n],1]},MemberQ[idn3,idn]]; Join[{0},Select[Range[ 2600],n3ssQ]] (* Harvey P. Dale, Jan 23 2012 *)
    Select[Range[0,2600],SequenceCount[IntegerDigits[#^3],IntegerDigits[ #]]> 0&] (* Harvey P. Dale, Aug 29 2021 *)

A136510 Smallest k>1 such that in binary representation n is contained in n^k.

Original entry on oeis.org

2, 2, 3, 2, 3, 3, 3, 2, 3, 3, 5, 3, 4, 3, 3, 2, 3, 3, 6, 3, 6, 5, 3, 3, 5, 5, 2, 3, 3, 3, 3, 2, 3, 3, 6, 3, 8, 6, 3, 3, 2, 9, 4, 5, 6, 5, 5, 3, 5, 5, 4, 5, 6, 2, 5, 3, 5, 3, 6, 3, 6, 3, 3, 2, 3, 3, 6, 3, 7, 6, 10, 3, 9, 11, 5, 7, 8, 4, 5, 3, 9, 2, 8, 9, 7, 4, 6, 5, 6, 6, 3, 5, 5, 5, 5, 3, 5, 5, 3, 5, 9, 11, 7, 5
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 03 2008

Keywords

Comments

A136511(n) = n^a(n);
a(A018826(n)) = 2; 1 < a(A136490(n)) <= 3;
conjecture: a(n) is defined for all n.

Crossrefs

Variant of A086063.

Programs

  • Mathematica
    Table[Module[{k=2},While[SequenceCount[IntegerDigits[n^k,2],IntegerDigits[ n,2]]==0,k++];k],{n,110}] (* Harvey P. Dale, Aug 20 2020 *)
Showing 1-4 of 4 results.