login
A163293
a(n) = n-th prime minus (number of bits in binary expansion of n-th prime).
2
0, 1, 2, 4, 7, 9, 12, 14, 18, 24, 26, 31, 35, 37, 41, 47, 53, 55, 60, 64, 66, 72, 76, 82, 90, 94, 96, 100, 102, 106, 120, 123, 129, 131, 141, 143, 149, 155, 159, 165, 171, 173, 183, 185, 189, 191, 203, 215, 219, 221, 225, 231, 233, 243, 248, 254, 260, 262, 268, 272
OFFSET
1,3
COMMENTS
Number of bits in binary expansion of n-th prime = A035100.
LINKS
FORMULA
a(n) = A000040(n) - A035100(n).
EXAMPLE
a(6) = 13 - 4 = 9;
a(7) = 17 - 5 = 12.
MAPLE
A000040 := proc(n) ithprime(n) ; end: A035100 := proc(n) max(1, ilog2(A000040(n))+1) ; end: A163293 := proc(n) A000040(n)-A035100(n) ; end: seq(A163293(n), n=1..100) ; # R. J. Mathar, Jul 26 2009
MATHEMATICA
Table[Prime[n] - Length[IntegerDigits[Prime[n], 2]], {n, 100}] (* G. C. Greubel, Dec 17 2016 *)
PROG
(PARI) for(n=1, 60, p=prime(n); print1(p-#binary(p), ", ")) \\ Washington Bomfim Jan 18 2011
CROSSREFS
Sequence in context: A087733 A065027 A165994 * A188045 A247912 A186321
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved