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.

A103510 a(n) = 1 + 2 * least i such that A103509(i)=n+1, 0 if no such i exists.

This page as a plain text file.
%I A103510 #8 Jul 23 2025 17:08:28
%S A103510 9,11,21,57,23,55,245,241,115,833,83,523,437,193,447,733,167,689,1417,
%T A103510 611,2297,1081,2731,1283,2755,5057,2761,887,2719,9221,4909,8179,4397,
%U A103510 13891,9557,2351,9257,5869,10627,11941,1487,2797,3947,5899,11237,20069
%N A103510 a(n) = 1 + 2 * least i such that A103509(i)=n+1, 0 if no such i exists.
%t A103510 Array[a, 500]; Do[a[n] = 0, {n, 1, 500}]; n = 9; ct = 0; While[ct < 150, m = 3; While[ ! (PrimeQ[m] && (((n - m)/2) > 2) && PrimeQ[(n - m)/2]), m = m + 2]; k = PrimePi[m]; If[a[k] == 0, a[k] = n; ct = ct + 1]; n = n + 2]; Print[a]
%o A103510 (Scheme) (define (A103510 n) (+ 1 (* 2 (first-n-where-fun_n-is-i1 A103509 (+ 1 n)))))
%o A103510 (define (first-n-where-fun_n-is-i1 fun i) (let loop ((n 1)) (cond ((= i (fun n)) n) (else (loop (+ n 1))))))
%Y A103510 Cf. A103508, A103151, A103152, A103153, A103506, A103509, A025017.
%K A103510 nonn,hard
%O A103510 1,1
%A A103510 _Lei Zhou_, Feb 10 2005
%E A103510 Edited and Scheme-code added by _Antti Karttunen_, Jun 19 2007