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.

Previous Showing 11-13 of 13 results.

A280648 Numbers k such that k^3 has an odd number of digits and the middle digit is 8.

Original entry on oeis.org

2, 24, 35, 38, 120, 127, 131, 138, 145, 172, 174, 182, 183, 208, 212, 215, 471, 481, 482, 485, 495, 505, 516, 517, 544, 551, 567, 594, 601, 610, 617, 621, 644, 646, 674, 677, 689, 736, 739, 749, 756, 768, 773, 774, 775, 776, 786, 799, 803, 812, 821, 830, 835
Offset: 1

Views

Author

Lars Blomberg, Jan 07 2017

Keywords

Comments

The sequence of cubes starts: 8, 13824, 42875, 54872, 1728000, 2048383, 2248091, 2628072, ...

Examples

			2^3 = (8), 172^3 = 508(8)448, 610^3 = 2269(8)1000.
		

Crossrefs

See A279420-A279429 for a k^2 version.
See A279430-A279431 for a k^2 version in base 2.

Programs

  • Mathematica
    Select[Range[835], OddQ[len=Length[IntegerDigits[#^3]]]&&Part[IntegerDigits[#^3], (len+1)/2]==8 &] (* Stefano Spezia, Oct 03 2023 *)

A280650 Numbers k such that k^3 has an odd number of digits in base 2 and the middle digit is 0.

Original entry on oeis.org

0, 3, 4, 12, 16, 17, 29, 30, 31, 43, 44, 46, 48, 50, 64, 65, 68, 78, 79, 80, 102, 104, 105, 107, 108, 109, 112, 114, 116, 117, 118, 121, 127, 163, 167, 169, 170, 172, 173, 174, 175, 176, 179, 183, 186, 187, 188, 189, 191, 192, 193, 195, 196, 198, 200, 202, 203
Offset: 1

Views

Author

Lars Blomberg, Jan 12 2017

Keywords

Examples

			3^3 = 11(0)11_2, 43^3 = 10011011(0)10010011_2, 117^3 = 1100001110(0)0001001101_2.
		

Crossrefs

Cf. A280651.
See A279430-A279431 for a k^2 version.
See A280640-A280649 for a base-10 version.
See A279420-A279429 for a k^2, base-10 version.

Programs

  • Mathematica
    a[n_]:=Part[IntegerDigits[n, 2], (Length[IntegerDigits[n,2]] + 1)/2];
    Select[Range[0, 203], OddQ[Length[IntegerDigits[#^3, 2]]] && a[#^3]==0 &] (* Indranil Ghosh, Mar 06 2017 *)
    md0Q[n_]:=Module[{idn2=IntegerDigits[n^3,2],len},len=Length[idn2];OddQ[ len] &&idn2[[(len+1)/2]]==0]; Select[Range[0,250],md0Q] (* Harvey P. Dale, Dec 15 2019 *)
  • PARI
    isok(k) = my(d=digits(k^3, 2)); (#d%2 == 1) && (d[#d\2 +1] == 0);
    for(k=0, 203, if(k==0 || isok(k)==1, print1(k,", "))); \\ Indranil Ghosh, Mar 06 2017
    
  • Python
    i=0
    j=1
    while i<=203:
        n=str(bin(i**3)[2:])
        l=len(n)
        if l%2==1 and n[(l-1)/2]=="0":
            print (str(i))+",",
            j+=1
        i+=1 # Indranil Ghosh, Mar 06 2017

A280651 Numbers k such that k^3 has an odd number of digits in base 2 and the middle digit is 1.

Original entry on oeis.org

1, 5, 7, 11, 18, 19, 20, 26, 27, 28, 41, 42, 45, 47, 49, 66, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 103, 106, 110, 111, 113, 115, 119, 120, 122, 123, 124, 125, 126, 162, 164, 165, 166, 168, 171, 177, 178, 180, 181, 182, 184, 185, 190, 194, 197, 199, 201, 259
Offset: 1

Views

Author

Lars Blomberg, Jan 12 2017

Keywords

Examples

			5^3 = 111(1)101_2, 28^3 = 1010101(1)1000000_2, 111^3 = 1010011011(1)1001001111_2.
		

Crossrefs

Cf. A280650.
See A279430-A279431 for a k^2 version.
See A280640-A280649 for a base-10 version.
See A279420-A279429 for a k^2, base-10 version.

Programs

  • Mathematica
    a[n_]:=Part[IntegerDigits[n,2],(Length[IntegerDigits[n,2]]+1)/2];
    Select[Range[0, 259], OddQ[Length[IntegerDigits[#^3, 2]]] && a[#^3]==1 &] (* Indranil Ghosh, Mar 06 2017 *)
    ond2Q[n_]:=Module[{idn=IntegerDigits[n^3,2],len},len=Length[idn];OddQ[ len] && idn[[(len+1)/2]]==1]; Select[Range[300],ond2Q] (* Harvey P. Dale, Jul 21 2021 *)
  • PARI
    isok(k) = my(d=digits(k^3, 2)); (#d%2 == 1) && (d[#d\2 +1] == 1);
    for(k=0, 259, if(isok(k)==1, print1(k,", "))); \\ Indranil Ghosh, Mar 06 2017
    
  • Python
    i=0
    j=1
    while i<=259:
        n=str(bin(i**3)[2:])
        l=len(n)
        if l%2==1 and n[(l-1)/2]=="1":
            print (str(i))+",",
            j+=1
        i+=1 # Indranil Ghosh, Mar 06 2017
Previous Showing 11-13 of 13 results.