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.

A191233 The number of times that the n-th digit of A154703(n) occurs in A154703(n).

Original entry on oeis.org

1, 1, 5, 8, 11, 4, 16, 19, 23, 27, 32, 14, 38, 42, 47, 51, 23, 61, 64, 31, 35, 37, 80, 84, 47, 50, 96, 101, 106, 59, 117, 120, 123, 127, 131, 136, 83, 145, 150, 155, 160, 165, 172, 175, 109, 112, 189, 116, 201, 206, 125, 218, 129, 130, 232, 236, 147, 245, 156
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 27 2011

Keywords

Examples

			A154703(3) = 1011101. The third digit of 1011101 is "1", which occurs 5 times in 1011101. Thus a(3) = 5.
A154703(4) = 1011101111. The fourth digit of 1011101111 is "1", which occurs 8 times in 1011101111. Thus a(4) = 8.
		

Crossrefs

Programs

  • Maple
    with(StringTools): lim:=100: s:="": for j from 1 to lim do p:=ithprime(j): d:=convert(p,base,2): for k from nops(d) to 1 by -1 do s:=cat(s,d[k]): od: printf("%d, ", nops([SearchAll(s[j],s)])); od: # Nathaniel Johnston, May 27 2011
  • Mathematica
    Module[{p = IntegerDigits[Prime[Range[100]], 2], d}, Array[Count[d = Flatten[p[[;; #]]], d[[#]]] &, Length[p]]] (* Paolo Xausa, Feb 26 2024 *)

Extensions

Corrected and extended by Nathaniel Johnston, May 27 2011

A164893 Base 10 representation of the string formed by appending primes in base 2.

Original entry on oeis.org

2, 11, 93, 751, 12027, 192445, 6158257, 197064243, 6306055799, 201793785597, 6457401139135, 413273672904677, 26449515065899369, 1692768964217559659, 108337213709923818223, 6933581677435124366325, 443749227355847959444859, 28399950550774269404471037
Offset: 1

Views

Author

Gil Broussard, Aug 29 2009

Keywords

Comments

The subsequence of primes begins: 2, 11, 751. [Jonathan Vos Post, May 26 2010]

Examples

			The primes in base 2 (10, 11, 101, 111,...) concatenated by appending give the first four binary terms 10, 1011, 1011101, 1011101111; or 2, 11, 93, 751 base 10.
		

Crossrefs

Programs

  • Mathematica
    nn=20;With[{b2p=IntegerDigits[#,2]&/@Prime[Range[nn]]},Table[ FromDigits[ Flatten[ Take[b2p,n]],2],{n,nn}]] (* Harvey P. Dale, Mar 26 2013 *)
  • PARI
    list(n)=my(p=primes(n),s);vector(n,i,s=s<<#binary(p[i])+p[i]) \\ Charles R Greathouse IV, Mar 26 2013

Formula

a(n) = A154703(n) [converted from base 2 to base 10]. [Jonathan Vos Post, May 26 2010]

Extensions

Corrected by Harvey P. Dale, Mar 26 2013

A178388 Concatenation of the first n primes written in base 3.

Original entry on oeis.org

2, 210, 21012, 2101221, 2101221102, 2101221102111, 2101221102111122, 2101221102111122201, 2101221102111122201212, 21012211021111222012121002, 210122110211112220121210021011, 2101221102111122201212100210111101
Offset: 1

Views

Author

Jonathan Vos Post, May 26 2010

Keywords

Examples

			a(4) = Concatenate[prime(1) base 3, prime(2) base 3, prime(3) base 3, prime(3) base 3] = Concatenate[2 base 3, 3 base 3, 5 base 3, 7 base 3] = Concatenate[2, 10, 12, 21] = 2101221.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=15,p3},p3=IntegerDigits[Prime[Range[nn]],3];Table[FromDigits[Flatten[ Take[p3,n]]],{n,nn}]] (* Harvey P. Dale, Aug 25 2022 *)
  • PARI
    v = 0; for (n=1, 12, d = digits(prime(n), 3); v = v*10^#d + fromdigits(d); print1 (v ", ")) \\ Rémy Sigrist, Aug 07 2017

Extensions

Edited by N. J. A. Sloane, Jul 02 2017

A189799 Least position k of n (n written in base 2) in the infinite string 101110111110111101100011001110111... (i.e., 23571113171923... in base 2).

Original entry on oeis.org

1, 1, 3, 19, 1, 4, 3, 19, 24, 50, 1, 18, 4, 3, 7, 86, 19, 44, 24, 50, 56, 16, 1, 18, 23, 49, 4, 42, 3, 8, 7, 177, 86, 185, 19, 100, 44, 52, 24, 225, 50, 478, 56, 16, 47, 1, 5, 85, 18, 43, 23, 49, 55, 15, 4
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 24 2011

Keywords

Examples

			1 appears as (1)0111..., 2 appears as (10)111011..., 3 as 10(11)10111..., 4 as 101110111110111101(100)0...
		

Crossrefs

Programs

  • Maple
    A189799 := proc(n)
            local abin ,nbin ,nlen;
            abin := ListTools[Reverse](convert(A154703(100),base,10)) ;
            nbin := ListTools[Reverse](convert(n,base,2)) ;
            nlen := nops(nbin) ;
            for i from 1 do
                    if verify(nbin,[op(i..i+nlen-1,abin)],'sublist') then
                            return i;
                    end if;
            end do:
            return 0 ;
    end proc:
    seq(A189799(n),n=1..55) ; # R. J. Mathar, Jun 07 2011

Extensions

Corrected by R. J. Mathar, Jun 07 2011
Showing 1-4 of 4 results.