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.
%I A284049 #13 Feb 16 2025 08:33:43 %S A284049 1,2,3,4,5,6,7,9,8,11,12,13,10,15,14,17,20,21,16,25,18,19,22,27,26,23, %T A284049 24,29,30,31,28,33,34,37,36,35,32,39,40,41,38,43,46,51,50,47,42,55,48, %U A284049 49,52,45,44,53,54,59,62,63,58,67,60,61,64,57,56,65,66,71,68,69,70,79,72,77,74,75,76,73,78,85,82 %N A284049 a(n) is the smallest positive integer not already in the sequence such that a(n) + a(n-1) is a prime power, with a(1) = 1. %C A284049 Conjectured to be a permutation of the natural numbers. %H A284049 Robert Israel, <a href="/A284049/b284049.txt">Table of n, a(n) for n = 1..10000</a> %H A284049 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimePower.html">Prime Power</a> %H A284049 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %e A284049 a(8) = 9 because 1, 2, 3, 4, 5, 6 and 7 have already been used in the sequence, 7 + 8 = 15 is not prime power while 7 + 9 = 16 is a prime power. %p A284049 N:= 100: # to get all terms before the first term > N %p A284049 S:= [$2..N]: %p A284049 a[1]:= 1: found:= true: %p A284049 for n from 2 while found do %p A284049 found:= false; %p A284049 for j from 1 to nops(S) do %p A284049 if ispp(a[n-1]+S[j]) then %p A284049 found:= true; %p A284049 a[n]:= S[j]; %p A284049 S:= subsop(j=NULL,S); %p A284049 break %p A284049 fi %p A284049 od; %p A284049 od: %p A284049 seq(a[i],i=1..n-2); # _Robert Israel_, Apr 16 2017 %t A284049 f[s_List] := Block[{k = 1, a = s[[-1]]}, While[MemberQ[s, k] || ! PrimePowerQ[a + k], k++]; Append[s, k]]; Nest[f, {1}, 80] %Y A284049 Cf. A000961, A055265, A055266, A121878, A228730, A243625, A246655, A284048. %K A284049 nonn %O A284049 1,2 %A A284049 _Ilya Gutkovskiy_, Mar 19 2017