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.

A066248 a(n) = if n+1 is prime then A049084(n+1)*2 else A066246(n+1)*2 - 1.

This page as a plain text file.
%I A066248 #12 Mar 19 2025 08:34:57
%S A066248 2,4,1,6,3,8,5,7,9,10,11,12,13,15,17,14,19,16,21,23,25,18,27,29,31,33,
%T A066248 35,20,37,22,39,41,43,45,47,24,49,51,53,26,55,28,57,59,61,30,63,65,67,
%U A066248 69,71,32,73,75,77,79,81,34,83,36,85,87,89,91,93,38,95,97,99,40,101,42
%N A066248 a(n) = if n+1 is prime then A049084(n+1)*2 else A066246(n+1)*2 - 1.
%C A066248 Permutation of natural numbers; inverse: A066249.
%H A066248 Amiram Eldar, <a href="/A066248/b066248.txt">Table of n, a(n) for n = 1..10000</a>
%H A066248 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>.
%F A066248 a(n) = A026238(n+1)*2 - A066247(n+1).
%t A066248 a[n_] := If[PrimeQ[n+1], 2 * PrimePi[n+1], 2 * (n - PrimePi[n+1]) - 1]; Array[a, 100] (* _Amiram Eldar_, Mar 19 2025 *)
%Y A066248 Cf. A066249, A049084, A066246, A026238, A066247, A066250, A066252.
%K A066248 nonn
%O A066248 1,1
%A A066248 _Reinhard Zumkeller_, Dec 09 2001