login
Numbers of the form 2*p-1 or 3*p-1 where p is 1 or a prime.
1

%I #19 May 05 2019 03:24:27

%S 1,2,3,5,8,9,13,14,20,21,25,32,33,37,38,45,50,56,57,61,68,73,81,85,86,

%T 92,93,105,110,117,121,122,128,133,140,141,145,157,158,165,176,177,

%U 182,193,200,201,205,212,213,217,218,225,236,248,253,261,266,273,277,290,297,301,302,308

%N Numbers of the form 2*p-1 or 3*p-1 where p is 1 or a prime.

%F Union of A076274 and A112773.

%e a(1)=1 because p=1 and 2*1 - 1 = 1;

%e a(2)=2 because p=1 and 3*1 - 1 = 2;

%e a(3)=3 because p=2 and 2*2 - 1 = 3;

%e a(4)=5 because p=2 and 3*3 - 1 = 5 or p=3 and p=2 and 3*2 - 1 = 5;

%e a(5)=8 because p=3 and 3*3 - 1 = 8.

%p isA195896 := proc(n)

%p for p in {(n+1)/2,(n+1)/3} do

%p if type(p,'integer') then

%p if isprime(p) or p = 1 then

%p return true;

%p end if;

%p end if;

%p end do;

%p false ;

%p end proc:

%p for n from 1 to 400 do

%p if isA195896(n) then

%p printf("%d,",n) ;

%p end if;

%p end do: # _R. J. Mathar_, Oct 15 2011

%t Union[Flatten[Join[{1,2},{2#-1,3#-1}&/@Prime[Range[50]]]]] (* _Harvey P. Dale_, Mar 27 2015 *)

%Y Cf. A196127, A008578.

%K nonn

%O 1,2

%A _Juri-Stepan Gerasimov_, Sep 24 2011