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.

A383399 For n>1, a(n) is the smallest number greater than a(n-1), whose sum with any previous term is deficient, with a(1) = 1.

This page as a plain text file.
%I A383399 #19 Apr 26 2025 15:19:43
%S A383399 1,2,3,6,7,8,31,43,44,91,115,121,122,127,128,140,146,163,211,248,283,
%T A383399 290,331,403,427,464,511,595,631,667,668,751,842,883,931,955,1051,
%U A383399 1106,1123,1171,1243,1291,1388,1411,1555,1591,1682,1711,1723,1771,1843,1891,2011,2131
%N A383399 For n>1, a(n) is the smallest number greater than a(n-1), whose sum with any previous term is deficient, with a(1) = 1.
%C A383399 If not for the set condition that a(n) must be greater than a(n-1), the sequence would consist of only 1's, because 2 is a deficient number.
%C A383399 While a majority of the terms are deficient, a few are abundant, with the first instance being a(16) = 140.
%C A383399 This is also equivalent to the sum of any 2 terms being a deficient number.
%H A383399 Jakub Buczak, <a href="/A383399/b383399.txt">Table of n, a(n) for n = 1..10000</a>
%e A383399 7 is a member, because 7+6, 7+3, 7+2 and 7+1 are all deficient.
%p A383399 q:= n-> is(numtheory[sigma](n)<2*n):
%p A383399 a:= proc(n) option remember; local k, l;
%p A383399       l:= [seq(a(i), i=1..n-1)]:
%p A383399       for k from 1+`if`(n>1, a(n-1), 0)
%p A383399         while not andmap(j-> q(k+j), l) do od; k
%p A383399     end:
%p A383399 seq(a(n), n=1..54);  # _Alois P. Heinz_, Apr 25 2025
%t A383399 a[1] = 1; a[n_] := a[n] = Module[{k = a[n-1] + 1}, While[AnyTrue[Array[a, n-1], DivisorSigma[-1, #+k] >= 2 &], k++]; k]; Array[a, 54] (* _Amiram Eldar_, Apr 26 2025 *)
%o A383399 (PARI) isdeficient(n) = (sigma(n) < 2*n) ;
%o A383399 isok(k, n, va) = for (i=1, n-1, if (! isdeficient(k+va[i]), return(0));); return(1);
%o A383399 lista(nn) = my(va=vector(nn)); for (n=1, nn, my(k=if (n==1, 1, 1+va[n-1])); while(! isok(k, n, va), k++); k; va[n] = k;); va; \\ _Michel Marcus_, Apr 26 2025
%Y A383399 Cf. A383398, A005101, A005100.
%K A383399 nonn
%O A383399 1,2
%A A383399 _Jakub Buczak_, Apr 25 2025