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.

A357735 a(1)=1, a(2)=2. Thereafter a(n+1) is least k != partial sum s(n) which has not occurred earlier, such that gcd(k, s(n)) > 1.

This page as a plain text file.
%I A357735 #14 Jun 25 2025 21:30:59
%S A357735 1,2,6,3,4,8,9,11,10,12,14,5,15,16,18,20,7,21,13,24,27,22,26,28,23,25,
%T A357735 30,32,33,31,34,35,40,44,55,36,37,39,17,42,45,38,46,48,50,19,57,52,41,
%U A357735 62,43,54,56,58,60,64,51,63,66,49,70,77,68,69,72,75,74,76
%N A357735 a(1)=1, a(2)=2. Thereafter a(n+1) is least k != partial sum s(n) which has not occurred earlier, such that gcd(k, s(n)) > 1.
%C A357735 It follows from the definition that if s(n) is prime then a(n+1) = 2*s(n). This happens only once in the sequence, when a(3)=6, following s(2)=3. For all n > 2 s(n) is composite. Conjectured to be a permutation of the positive integers (primes not in natural order).
%H A357735 Michael De Vlieger, <a href="/A357735/b357735.txt">Table of n, a(n) for n = 1..16384</a>
%H A357735 Michael De Vlieger, <a href="/A357735/a357735.png">Log-log scatterplot of a(n)</a> n = 1..2^17, labeling records in red, local minima in blue, and highlighting prime terms in green.
%e A357735 Since a(1)=1 and a(2)=2, we have s(2)=3, then a(3) is 6, the smallest unused term sharing a divisor with 3.
%t A357735 nn = 2^16; c[_] = False; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; u = s = 3; Do[k = u; While[Nand[! c[k], ! CoprimeQ[k, s], k != s], k++]; Set[{a[n], c[k]}, {k, True}]; s += k; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn] (* _Michael De Vlieger_, Oct 11 2022 *)
%Y A357735 Cf. A064413, A084385, A347113, A351743.
%K A357735 nonn
%O A357735 1,2
%A A357735 _David James Sycamore_, Oct 11 2022