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.

A383269 a(n) is the smallest nonnegative solution to sigma(A383268(n) - x) + sigma(A383268(n) + x) = 4*A383268(n).

This page as a plain text file.
%I A383269 #7 May 02 2025 19:33:13
%S A383269 0,1,5,11,0,7,17,28,26,37,23,14,7,13,17,49,11,22,11,5,1,58,70,13,20,
%T A383269 37,19,11,17,31,41,67,6,16,13,73,49,11,55,91,19,73,119,5,11,77,53,43,
%U A383269 103,86,7,114,173,88,71,59,124,95,139,7,128,31,92,143,83,227,163
%N A383269 a(n) is the smallest nonnegative solution to sigma(A383268(n) - x) + sigma(A383268(n) + x) = 4*A383268(n).
%H A383269 Felix Huber, <a href="/A383269/b383269.txt">Table of n, a(n) for n = 1..1000</a>
%H A383269 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PerfectNumber.html">Perfect Number</a>
%F A383269 a(n) = 0 iff A383268(n) is a perfect number (A000396) and vice versa.
%e A383269 a(2) = 1 because sigma(A383268(2) - 1) + sigma(A383268(2) + 1) =  sigma(13 - 1) + sigma(13 + 1) = sigma(12) + sigma(14) = 28 + 24 = 52 = 4*13 = 4*A383268(2).
%p A383269 with(NumberTheory):
%p A383269 A383269:=proc(N) # To get the first N terms.
%p A383269     local k,x,X;
%p A383269     X:=[];
%p A383269     for k while nops(X)<N do
%p A383269         for x from 0 to k-1 do
%p A383269             if sigma(k-x)+sigma(k+x)=4*k then
%p A383269                 X:=[op(X),x];
%p A383269                 break
%p A383269             fi
%p A383269         od
%p A383269     od;
%p A383269     return op(X)
%p A383269 end proc;
%p A383269 A383269(67);
%o A383269 (PARI) isok(k) = for (x=0, k-1, if (sigma(k - x) + sigma(k + x) == 4*k, return(x))); return(-1);
%o A383269 lista(nn) = for (n=1, nn, my(m=isok(n)); if (m != -1, print1(m, ", "))); \\ _Michel Marcus_, Apr 26 2025
%Y A383269 Cf. A000203, A000396, A186103, A383268.
%K A383269 nonn,easy
%O A383269 1,3
%A A383269 _Felix Huber_, Apr 24 2025