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.

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

This page as a plain text file.
%I A195896 #19 May 05 2019 03:24:27
%S A195896 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 A195896 92,93,105,110,117,121,122,128,133,140,141,145,157,158,165,176,177,
%U A195896 182,193,200,201,205,212,213,217,218,225,236,248,253,261,266,273,277,290,297,301,302,308
%N A195896 Numbers of the form 2*p-1 or 3*p-1 where p is 1 or a prime.
%F A195896 Union of A076274 and A112773.
%e A195896 a(1)=1 because p=1 and 2*1 - 1 = 1;
%e A195896 a(2)=2 because p=1 and 3*1 - 1 = 2;
%e A195896 a(3)=3 because p=2 and 2*2 - 1 = 3;
%e A195896 a(4)=5 because p=2 and 3*3 - 1 = 5 or p=3 and p=2 and 3*2 - 1 = 5;
%e A195896 a(5)=8 because p=3 and 3*3 - 1 = 8.
%p A195896 isA195896 := proc(n)
%p A195896         for p in {(n+1)/2,(n+1)/3} do
%p A195896         if type(p,'integer') then
%p A195896                 if isprime(p) or p = 1 then
%p A195896                         return true;
%p A195896                 end if;
%p A195896         end if;
%p A195896         end do;
%p A195896         false ;
%p A195896 end proc:
%p A195896 for n from 1 to 400 do
%p A195896         if isA195896(n) then
%p A195896                 printf("%d,",n) ;
%p A195896         end if;
%p A195896 end do: # _R. J. Mathar_, Oct 15 2011
%t A195896 Union[Flatten[Join[{1,2},{2#-1,3#-1}&/@Prime[Range[50]]]]] (* _Harvey P. Dale_, Mar 27 2015 *)
%Y A195896 Cf. A196127, A008578.
%K A195896 nonn
%O A195896 1,2
%A A195896 _Juri-Stepan Gerasimov_, Sep 24 2011