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.

A235860 Minimal representation (considered minimal in any canonical base b >= 3) of n in a binary system using two distinct digits "1" and "2", not allowing zeros, where a digit d in position p (p = 1,2,3,...,n) represents the value d^p.

Original entry on oeis.org

1, 2, 12, 112, 21, 22, 122, 1122, 11122, 211, 212, 1212, 221, 222, 1222, 11222, 111222, 1111222, 2111, 2112, 12112, 2121, 2122, 12122, 112122, 2211, 2212, 12212, 2221, 2222, 12222, 112222, 1112222, 11112222, 111112222, 21111, 21112, 121112, 21121, 21122
Offset: 1

Views

Author

Robin Garcia, Jan 16 2014

Keywords

Examples

			a(4) = 112 because 1^3 + 1^2 + 2^1 = 4.
36(10) in base 10 is represented as 21111 in this base because 2^5 + 1^4 + 1^3 + 1^2 + 1^1 = 36. It could also be represented as 1111112222. The minimal representation, considered in base 10, is chosen.
		

Crossrefs

Programs

  • Mathematica
    t = Range[1000]*0; Do[d=1+IntegerDigits[k, 2, n]; dd = FromDigits@d; v = Total[ Reverse[d]^ Range[n]]; If[0 < v <= 1000 && (t[[v]] == 0 || dd < t[[v]]), t[[v]] = dd], {n,17}, {k, 0, 2^n-1}]; t (* first 1000 terms, Giovanni Resta, Jan 16 2014 *)

A237662 Primes of the form 2^(k+l+m+1) - 2^(l+m+1) + 2^(m+1) + l - 2.

Original entry on oeis.org

3, 7, 11, 17, 23, 31, 37, 47, 59, 67, 73, 101, 127, 131, 191, 223, 229, 239, 251, 257, 383, 401, 457, 479, 503, 521, 577, 991, 997, 1019, 1031, 1153, 1601, 1993, 2039, 2053, 2069, 3583, 3593, 3851, 3967, 4079, 4091, 4099, 4111, 4133, 6143, 6211
Offset: 1

Views

Author

Robin Garcia, Feb 11 2014

Keywords

Comments

These prime numbers can be written in the numeral system described in A235860 (perhaps not minimally) this way : 2..21..12..2 (or 1..12..2) k twos followed to the right by l ones, followed to the right by m twos.
k can be zero, with the arbitrary limitation, when k = 0, l <= m.
When k = m = 1 we get primes of the form 2^(l + 2) + l + 2.
It must be noted these primes include the Mersenne primes 3, 7, 31, 127, 8191, ... as well as the Fermat primes 3, 5, 17, 257, 65537, with the exception of 5. Mersenne primes can be represented by a one followed to the right by an even number of twos (if the number of twos is odd, the Mersenne number is divisible by 3) with the exception of 3 represented as 12. The Fermat numbers can be represented with three ones followed to the right by a Mersenne number of twos (2^t - 1 (t = 0, 1, 2, 3, 4, 5,...)) : 3 = 111 instead of shorter 12, 5 = 1112 instead of shorter 21, 17 = 111222, 257 = 1112222222, 65537 = 111222222222222222. The composite (divisible by 641) 2^32 + 1 : three ones followed to the right by thirty one twos. The second Fermat prime: 5, appears in this sequence if we let l > m and l <= 3 when k = 0.
By A235860 3, 7 , 17 and 31 can be represented as 12, 122, 111222, 12222 cases when k=0 (primes of the form 2^(m+1) + l - 2: 31 = 2^5 +1 -2). And 11, 73, 191 as 212, 211122, 2122222 (73 = 2^7 - 2^6 + 2^3 + 3 - 2).

Examples

			For k=l=m=1, 2^(k+l+m+1) - 2^(l+m+1) + 2^(m+1) + l - 2 = 2^4 - 2^3 + 2^2 + 1 - 2 = 16 - 8 + 4 + 1 - 2 = 11, so 11 is in the sequence.
		

Crossrefs

Programs

  • PARI
    n=10^5;e=89;a=1;if(a%2==0,a=a+1);b=ceil(log(n)/log(2));i=0;d=floor(b^(2.5));v=vector(d);for(n=0,b,for(p=a,b,if(n==0,x=p,x=b);forstep(m=a,x,2,c=2^(n+m+p+1)-2^(m+p+1)+2^(p+1)+m-2;if(isprime(c),i++;v[i]=c))));w=vecsort(v,,8);u=vector(#(w)-1);for(j=1,#(w)-1,u[j]=w[j+1]);if(e>#(u),e=#(u));s=vector(e);for(k=1,e,s[k]=u[k];print1(s[k], ", "))
Showing 1-2 of 2 results.