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.

A068432 Expansion of golden ratio (1 + sqrt(5))/2 in base 2.

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0
Offset: 1

Views

Author

Benoit Cloitre, Mar 09 2002

Keywords

Comments

Differs from A004555 in the 2nd digit. - R. J. Mathar, Dec 15 2008

Examples

			1.1001111000110111011110011011100101...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[ (1+Sqrt[5])/2, 2, 1000][[1]]
  • PARI
    concat(binary((1+sqrt(5))/2)) \\ Michel Marcus, Dec 14 2017
    
  • PARI
    a(n) = floor(quadgen(5)*2^(n-1))%2 \\ Chittaranjan Pardeshi, Feb 06 2023

A096432 Let n = 2^e_2 * 3^e_3 * 5^e_5 * ... be the prime factorization of n; sequence gives n such that 1 + max{e_2, e_3, ...} is a prime.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83
Offset: 1

Views

Author

N. J. A. Sloane, Sep 18 2008

Keywords

Comments

The old entry with this sequence number was a duplicate of A004555.
Sequence is of positive density. - Charles R Greathouse IV, Dec 07 2012
The asymptotic density of this sequence is Sum_{p prime} (1/zeta(p) - 1/zeta(p-1)) = 0.8817562193... - Amiram Eldar, Oct 18 2020

Crossrefs

Programs

  • Maple
    (Maple code for this entry and A074661)
    M:=2000; ans1:=[]; ans2:=[];
    for n from 1 to M do
    t1:=op(2..-1, ifactors(n)); t2:=nops(t1);
    m1:=0; for i from 1 to t2 do m1:=max(m1,t1[i][2]); od:
    if isprime(1+m1) then ans1:=[op(ans1),n]; fi;
    if isprime(m1) then ans2:=[op(ans2),n]; fi;
    od:
  • Mathematica
    Select[Range[2, 100], PrimeQ[1 + Max[FactorInteger[#][[;; , 2]]]] &] (* Amiram Eldar, Oct 18 2020 *)
  • PARI
    isA096432(n) = if(n<2,0,isprime(vecmax(factor(n)[,2])+1))

A004559 Expansion of sqrt(5) in base 6.

Original entry on oeis.org

2, 1, 2, 2, 5, 5, 3, 5, 5, 3, 1, 5, 1, 3, 0, 3, 3, 4, 3, 1, 2, 4, 5, 1, 4, 3, 2, 0, 3, 4, 0, 2, 4, 0, 1, 3, 4, 5, 4, 0, 2, 5, 2, 1, 3, 2, 2, 3, 2, 0, 3, 3, 2, 5, 0, 2, 1, 5, 4, 4, 1, 1, 0, 1, 3, 2, 1, 5, 5, 0, 1, 0, 0, 0, 4, 5, 3, 1, 4, 1, 1, 2, 5, 1, 4, 2, 5, 0, 0, 0, 0, 1, 1, 3, 4, 5, 1, 3, 5
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    Prune(Reverse(IntegerToSequence(Isqrt(5*6^200), 6))); // Vincenzo Librandi, Jan 08 2018
  • Mathematica
    RealDigits[Sqrt[5],6,120][[1]] (* Harvey P. Dale, Mar 24 2012 *)

Extensions

Updated by Alois P. Heinz at the suggestion of Kevin Ryde, Feb 19 2012

A316997 Number of 1's in the first n digits of the binary expansion of sqrt(n).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 4, 3, 5, 2, 5, 5, 9, 7, 11, 13, 1, 7, 9, 9, 12, 9, 11, 14, 10, 2, 13, 13, 16, 12, 16, 12, 16, 19, 18, 15, 2, 21, 18, 20, 19, 25, 19, 20, 25, 26, 19, 24, 26, 3, 20, 25, 25, 31, 28, 36, 30, 33, 33, 37, 38
Offset: 0

Views

Author

Rainer Rosenthal, Dec 14 2018

Keywords

Examples

			For n = 7 we have sqrt(7) = 2.64575131... with binary expansion 10.1010010.... Of the first 7 digits there are a(7) = 3 digits equal to 1.
		

Crossrefs

Programs

  • Maple
    zaehle := proc(n) local e, p, c, i, z, m; Digits := n+5; e := evalf(sqrt(n)); p := [op(convert(e, binary))]; c := convert(p[1], base, 10); z := 0; m := min(n, nops(c)); for i to m do if c[-i] = 1 then z := z+1; fi; od; return z; end: seq(zaehle(n), n=0..60); # Rainer Rosenthal, Dec 14 2018
    a := n -> StringTools:-CountCharacterOccurrences(convert(convert(evalf(sqrt(n), n+5), binary, n), string), "1"): seq(a(n),n=0..60); # Peter Luschny, Dec 15 2018
  • Mathematica
    a[n_] := Count[RealDigits[Sqrt[n], 2, n][[1]], 1]; Array[a, 60, 0] (* Amiram Eldar, Dec 14 2018 *)
  • PARI
    a(n)=my(v=concat(binary(sqrt(n))));hammingweight(v[1..n]) \\ Hugo Pfoertner, Dec 16 2018

Formula

a(n^2) = A000120(n). - Michel Marcus, Dec 15 2018
Showing 1-4 of 4 results.