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.

A062559 A B2 sequence consisting of powers of primes but not primes: a(n) = least value from A025475 such that sequence increases and pairwise sums of distinct elements are all distinct.

This page as a plain text file.
%I A062559 #20 Sep 11 2023 11:40:26
%S A062559 4,8,9,16,25,27,49,64,121,243,256,343,512,729,961,1024,1331,1369,1849,
%T A062559 2048,2187,2197,2401,3125,3481,4096,4913,5329,6561,6859,6889,8192,
%U A062559 10201,12769,14641,15625,16384,16807,19683,22201,22801,27889,28561,29791,32768
%N A062559 A B2 sequence consisting of powers of primes but not primes: a(n) = least value from A025475 such that sequence increases and pairwise sums of distinct elements are all distinct.
%C A062559 32 is the first prime power > 1 not in this sequence.
%o A062559 (Python)
%o A062559 from itertools import count, islice
%o A062559 from sympy import factorint
%o A062559 def A062559_gen(): # generator of terms
%o A062559     aset2, alist = set(), []
%o A062559     for k in count(0):
%o A062559         if len(f:=factorint(k).values()) == 1 and max(f) > 1:
%o A062559             bset2 = set()
%o A062559             for a in alist:
%o A062559                 if (b:=a+k) in aset2:
%o A062559                     break
%o A062559                 bset2.add(b)
%o A062559             else:
%o A062559                 yield k
%o A062559                 alist.append(k)
%o A062559                 aset2.update(bset2)
%o A062559 A062559_list = list(islice(A062559_gen(),30)) # _Chai Wah Wu_, Sep 11 2023
%Y A062559 Cf. A000961, A025475, A010672, A011185, A025582, A005282.
%K A062559 nonn
%O A062559 0,1
%A A062559 _Labos Elemer_, Jul 03 2001
%E A062559 More terms from _Sean A. Irvine_, Apr 03 2023