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.

A326782 Numbers whose binary indices are prime numbers.

This page as a plain text file.
%I A326782 #12 Jul 27 2019 14:57:51
%S A326782 0,2,4,6,16,18,20,22,64,66,68,70,80,82,84,86,1024,1026,1028,1030,1040,
%T A326782 1042,1044,1046,1088,1090,1092,1094,1104,1106,1108,1110,4096,4098,
%U A326782 4100,4102,4112,4114,4116,4118,4160,4162,4164,4166,4176,4178,4180,4182,5120
%N A326782 Numbers whose binary indices are prime numbers.
%C A326782 A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
%C A326782 Write n = 2^e_1 + 2^e_2 + 2^e_3 + ..., with e_1>e_2>e_3>... We require that all the numbers e_i + 1 are primes. So 6 = 2^2+2^1 is OK because 2+1 and 1+1 are primes. 0 is OK because there are no e_i. - _N. J. A. Sloane_, Jul 27 2019
%H A326782 Robert Israel, <a href="/A326782/b326782.txt">Table of n, a(n) for n = 1..10000</a>
%e A326782 The sequence of terms together with their binary indices begins:
%e A326782      0: {}
%e A326782      2: {2}
%e A326782      4: {3}
%e A326782      6: {2,3}
%e A326782     16: {5}
%e A326782     18: {2,5}
%e A326782     20: {3,5}
%e A326782     22: {2,3,5}
%e A326782     64: {7}
%e A326782     66: {2,7}
%e A326782     68: {3,7}
%e A326782     70: {2,3,7}
%e A326782     80: {5,7}
%e A326782     82: {2,5,7}
%e A326782     84: {3,5,7}
%e A326782     86: {2,3,5,7}
%e A326782   1024: {11}
%e A326782   1026: {2,11}
%e A326782   1028: {3,11}
%e A326782   1030: {2,3,11}
%p A326782 f:= proc(n) local L,i;
%p A326782   L:= convert(n,base,2);
%p A326782   add(L[i]*2^(ithprime(i)-1),i=1..nops(L))
%p A326782 end proc:
%p A326782 map(f, [$0..100]); # _Robert Israel_, Jul 26 2019
%t A326782 bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
%t A326782 Select[Range[0,100],And@@PrimeQ/@bpe[#]&]
%Y A326782 Cf. A000120, A029931, A048793, A070939, A326031, A326701, A326781, A326788.
%K A326782 nonn
%O A326782 1,2
%A A326782 _Gus Wiseman_, Jul 25 2019