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.

A245589 Primes which are the average of the two adjacent primes and also of the two adjacent squarefree numbers.

This page as a plain text file.
%I A245589 #25 Nov 10 2024 05:16:13
%S A245589 53,593,1747,2287,4013,4409,5563,6317,8117,10657,10853,11933,12547,
%T A245589 12583,12653,15161,16937,17047,17851,18341,19603,19949,20107,22051,
%U A245589 26693,31051,32993,35851,35911,39113,42209,42533,44041,46889,47527,48259,50417,51461
%N A245589 Primes which are the average of the two adjacent primes and also of the two adjacent squarefree numbers.
%C A245589 Intersection of A006562 and A240475. Intersection of A006562 and A245289.
%H A245589 Jens Kruse Andersen, <a href="/A245589/b245589.txt">Table of n, a(n) for n = 1..10000</a>
%e A245589 53 is in this sequence because 53 = prime(16) = (prime(15) + prime(17))/2 = (47 + 59)/2 and 53 = squarefree(33) = (squarefree(32) + squarefree(34))/2 = (51 + 55)/2.
%p A245589 Primes:= select(isprime,[$1..10^5]):
%p A245589 Sqfree:= select(numtheory:-issqrfree,[$1..10^5]):
%p A245589 A:= NULL:
%p A245589 for i from 2 to nops(Primes)-1 do
%p A245589    if Primes[i] = (Primes[i+1]+Primes[i-1])/2 then
%p A245589       member(Primes[i],Sqfree,'j');
%p A245589       if Primes[i] = (Sqfree[j-1]+Sqfree[j+1])/2 then
%p A245589          A:= A,Primes[i]
%p A245589       fi
%p A245589    fi
%p A245589 od:
%p A245589 A; # _Robert Israel_, Aug 21 2014
%o A245589 (PARI)
%o A245589 maxp=60000;
%o A245589 p=[]; my(v=primes(maxp)); for(k=2, #v-1, if(2*v[k] == v[k-1]+v[k+1], p=concat(p, v[k]))); p;
%o A245589 v = select(n->issquarefree(n), vector(maxp, n, n));
%o A245589 s=[]; for(k=2, #v-1, if(2*v[k] == v[k-1]+v[k+1], s=concat(s, v[k]))); s;
%o A245589 setintersect(p, s) \\ _Colin Barker_, Aug 07 2014
%Y A245589 Cf. A006562, A240475, A245289.
%K A245589 nonn
%O A245589 1,1
%A A245589 _Juri-Stepan Gerasimov_, Jul 26 2014
%E A245589 Missing term (16937) inserted by _Colin Barker_, Aug 07 2014