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.

A276988 a(n) is the least k such that 10*k+prime(n) is composite.

This page as a plain text file.
%I A276988 #23 Nov 04 2024 11:13:28
%S A276988 1,3,1,2,1,2,1,2,1,1,2,2,1,2,1,1,1,2,1,1,2,2,1,1,2,1,2,1,1,1,2,1,1,2,
%T A276988 1,1,2,2,1,1,1,2,1,1,1,1,1,2,1,2,1,1,2,1,1,1,1,2,1,1,2,1,2,1,1,1,1,2,
%U A276988 1,2,1,1,1,2,2,1,1,1,1,2,1,2,1,2,2,1,1,2,1,1
%N A276988 a(n) is the least k such that 10*k+prime(n) is composite.
%C A276988 It appears that a(n)<3 for n>2 (checked up to 10^7).
%C A276988 This comment is surely true since every prime except 3 equals 1 or 2 mod 3, so the addition of 10 == 1 mod 3 once or twice makes it divisible by 3. So (3 - (prime(n) mod 3)) is an upper bound. - _Andrey Zabolotskiy_, Nov 01 2016
%H A276988 Robert Israel, <a href="/A276988/b276988.txt">Table of n, a(n) for n = 1..10000</a>
%e A276988 For n=1, 10+2=3x4 so a(1)=1;
%e A276988 For n=2, 13 and 23 are prime, but then 30+3=3x11 so a(2)=3;
%e A276988 For n=3, 10+5=3x5 so a(3)=1;
%e A276988 For n=4, 17 is prime, but then 20+7=3x9 so a(4)=2.
%p A276988 f:= proc(n) local p,k;
%p A276988   p:= ithprime(n);
%p A276988   for k from 1 do if not isprime(p+10*k) then return k fi od
%p A276988 end proc:
%p A276988 map(f, [$1..100]); # _Robert Israel_, Nov 04 2024
%o A276988 (PARI) isc(n) = (n > 1) && !isprime(n);
%o A276988 a(n) = my(k = 0, p = prime(n)); while(!isc(p+10*k), k++); k; \\ _Michel Marcus_, Sep 27 2016
%K A276988 nonn
%O A276988 1,2
%A A276988 _Yves Debeuret_, Sep 24 2016
%E A276988 More terms from _Michel Marcus_, Sep 27 2016