The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270338 Primes whose decimal expansion contains only 3's and 4's, in which every 4 is preceded and followed by a 3. 2

%I #27 Apr 03 2023 10:36:13

%S 3343,3433,33343,333433,334333,343333,343433,3333433,3343343,3343433,

%T 3433333,34333333,333334333,333343343,333343433,333433343,333434333,

%U 334334333,3333334343,3333433343,3334333333,3343334333,3343434343,3433434343,3434343433,33333333343

%N Primes whose decimal expansion contains only 3's and 4's, in which every 4 is preceded and followed by a 3.

%C A sequence related to A054356. These primes look like "EEhEEhEEE" when viewed upside down by rotation of 180 degrees (3343 - "EhEE", 3433 - "EEhE", 33343 - "EhEEE", 333433 - "EEhEEE").

%D Giorgio Balzarotti, Paolo P. Lava, Centotre curiosità matematiche, Hoepli, 2010, pp. 3-4.

%H Robert Israel, <a href="/A270338/b270338.txt">Table of n, a(n) for n = 1..10000</a>

%H G. L. Honaker, Jr. and Chris Caldwell, <a href="https://t5k.org/curios/cpage/13463.html">Prime Curios!: 47</a>

%H G. L. Honaker, Jr. and Chris Caldwell, <a href="https://t5k.org/curios/cpage/1166.html">Prime Curios!: 3343</a>

%p S:= {}:

%p for n from 3 to 16 do

%p for k from 1 to floor((n-1)/2) do

%p for r in combinat:-choose(n-1-k,k) do

%p L:=subsop(seq(t=(3,4),t=r),[3$(n-k)]);

%p x:= add(L[i]*10^(n-i),i=1..n);

%p if isprime(x) then S:= S union {x} fi

%p od od od:

%p sort(convert(S,list)); # _Robert Israel_, Mar 15 2016

%t Select[Flatten[Table[FromDigits/@Select[Tuples[{3,4},n],SequenceCount[ #,{3,4,3},Overlaps->True]==Count[#,4]&],{n,3,11}]],PrimeQ]//Sort (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Sep 17 2016 *)

%o (Magma) [p: p in [3..33333333343 by 10] | (p mod 100 eq 33 or p mod 100 eq 43) and IsPrime(p) and Position(IntegerToString(p), IntegerToString(3)) eq 1 and Set(Intseq(p)) subset [3, 4] and not IntegerToString(44) in IntegerToString(p)];

%Y Cf. A054356. Subsequence of A020461.

%K nonn,base,dumb

%O 1,1

%A _Arkadiusz Wesolowski_, Mar 15 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 22:15 EDT 2024. Contains 372496 sequences. (Running on oeis4.)