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.

A280997 Primes that have exactly 3 ones in both their binary and ternary expansions.

This page as a plain text file.
%I A280997 #13 Jul 20 2025 12:30:22
%S A280997 13,37,41,67,97,131,193,577,1033,1153,2053,4129,8209,18433,32771,
%T A280997 32801,32833,65539,133121,525313,557057,1049089,4194433,167772161,
%U A280997 268435459
%N A280997 Primes that have exactly 3 ones in both their binary and ternary expansions.
%C A280997 Sequence is likely to be finite. If it exists, a(26) > 10^200. - _Robert Israel_, Jan 12 2017
%e A280997 37 is in the sequence because it is a prime and its binary expansion 100101 and ternary expansion 1101 both have exactly 3 ones.
%e A280997 131 is in the sequence because it is a prime and its binary expansion 10000011 and ternary expansion 11212 both have exactly 3 ones.
%p A280997 A:= NULL:
%p A280997 for a from 2 to 100 do
%p A280997   for b from 1 to a-1 do
%p A280997     p:= 2^a + 2^b + 1;
%p A280997     if numboccur(1, convert(p,base,3)) = 3 and isprime(p) then
%p A280997       A:= A, p
%p A280997     fi
%p A280997 od od:
%p A280997 A; # _Robert Israel_, Jan 12 2017
%t A280997 Select[Prime[Range[500000]], Count[IntegerDigits[#, 3], 1] == Count[IntegerDigits[#, 2], 1] == 3 &]
%t A280997 Select[Prime[Range[300000]],DigitCount[#,2,1]==DigitCount[#,3,1]==3&] (* The program generates the first 23 terms of the sequence. *) (* _Harvey P. Dale_, Jul 20 2025 *)
%Y A280997 Cf. A000040, A001363, A007088, A014311, A066196.
%Y A280997 Subset of A281004.
%K A280997 nonn,base
%O A280997 1,1
%A A280997 _K. D. Bajpai_, Jan 12 2017