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.

A196127 Union of p-1, 2p-1 and 3p-1 where p is a prime (without repetition).

This page as a plain text file.
%I A196127 #18 Apr 30 2019 05:02:26
%S A196127 1,2,3,4,5,6,8,9,10,12,13,14,16,18,20,21,22,25,28,30,32,33,36,37,38,
%T A196127 40,42,45,46,50,52,56,57,58,60,61,66,68,70,72,73,78,81,82,85,86,88,92,
%U A196127 93,96,100,102,105,106,108,110,112,117,121,122,126,128,130
%N A196127 Union of p-1, 2p-1 and 3p-1 where p is a prime (without repetition).
%H A196127 Nathaniel Johnston, <a href="/A196127/b196127.txt">Table of n, a(n) for n = 1..10000</a>
%p A196127 lim:=70: S:={}: p:=1: for n from 1 to lim do p:=nextprime(p): S := S union {p-1,2*p-1,3*p-1}: od: op(1..lim,S); # _Nathaniel Johnston_, Sep 28 2011
%t A196127 With[{upto=130},Select[{#-1,2#-1,3#-1}&/@Prime[Range[PrimePi[upto]+1]]//Flatten//Union,#<=upto&]] (* _Harvey P. Dale_, Apr 22 2016 *) (* or *)
%t A196127 Select[Range@130, Or @@ PrimeQ[(#+1)/{1,2,3}] &] (* _Giovanni Resta_, Apr 30 2019 *)
%Y A196127 Cf. A006093, A076274.
%K A196127 nonn,easy
%O A196127 1,2
%A A196127 _Juri-Stepan Gerasimov_, Sep 28 2011
%E A196127 Entries checked by _R. J. Mathar_, Sep 28 2011