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-2 of 2 results.

A162401 a(n) is the largest integer whose square, when represented in binary, is a substring within the binary representation of n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Jul 02 2009

Keywords

Comments

A162400(n) = A162401(n)^2.

Crossrefs

Cf. A162400.

Programs

  • Mathematica
    f[n_] := Block[{k = Floor@ Sqrt@ n, s = ToString@ FromDigits@ IntegerDigits[n, 2]}, While[ StringPosition[s, ToString@ FromDigits@ IntegerDigits[k^2, 2]] == {}, k-- ]; k]; Array[f, 105] (* Robert G. Wilson v, Jul 16 2009 *)

Extensions

a(16) correction and more terms from Robert G. Wilson v, Jul 16 2009

A175384 A positive integer k is included if the largest square dividing k is not equal to the largest square that, when written in binary, occurs as a substring in binary k.

Original entry on oeis.org

17, 19, 27, 33, 34, 35, 37, 38, 39, 41, 45, 51, 54, 57, 63, 65, 66, 67, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 82, 83, 89, 90, 97, 99, 101, 102, 103, 105, 108, 113, 114, 115, 117, 125, 126, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 141, 142, 143, 145, 146
Offset: 1

Views

Author

Leroy Quet, Apr 24 2010

Keywords

Comments

A008833(a(n)) does not equal A162400(a(n)).

Examples

			The largest square dividing 17 is 1. However, 17 in binary is 10001; and the largest square occurring, in its binary representation, within 10001 is 4 (100 in binary). Since 1 does not equal 4, then 17 is in this sequence.
		

Crossrefs

Programs

  • Maple
    From R. J. Mathar, Aug 31 2010: (Start)
    A008833 := proc(n) local b; b := floor(sqrt(n)) ; while b >= 1 do if n mod (b^2) = 0 then return b^2 ; end if; b := b-1 ; end do: end proc:
    A162400 := proc(n) local b,nbin,a; a := 1 ; nbin := convert(n,base,2) ; for b from 1 to floor(sqrt(n)) do convert(b^2,base,2) ; if verify(%,nbin,'sublist') then a := b^2 ; end if; end do: a ; end proc:
    isA162400 := proc(n) A008833(n) <> A162400(n) ; end proc:
    for n from 1 to 300 do if isA162400(n) then printf("%d,",n) ; end if; end do: (End)

Extensions

More terms from R. J. Mathar, Aug 31 2010
Showing 1-2 of 2 results.