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.

A120740 Numbers n such that n = Sum_digits[k*abs(n-k)] for some k>=0.

This page as a plain text file.
%I A120740 #12 Dec 14 2023 05:24:26
%S A120740 0,4,5,9,14,18,23,27,32,36,41,45,50,54,59,63,68,72,77,81,86,90,95,99,
%T A120740 104,108,113,117,122,126,131,135,140,144,149,153,158,162,167,171,176,
%U A120740 180,185,189,194,198,203,207,212,216,221,225,230,234,239,243,248,252
%N A120740 Numbers n such that n = Sum_digits[k*abs(n-k)] for some k>=0.
%C A120740 The first difference is eventually 2-periodic: 4, 1, 4, 5, 4, 5, 4, etc. The minimum numbers k associated to the first elements of the sequence are (n,k): (0,0), (4,2), (5,7), (9,3), (14,19), (18,33), (23,67), (27,69), etc.
%F A120740 Conjecture: a(n) = (18*n-(-1)^n-35)/4 for n>2. a(n) = a(n-1)+a(n-2)-a(n-3) for n>5. G.f.: x^2*(4+x+4*x^3)/((1-x)^2*(1+x)). [_Colin Barker_, Apr 10 2012]
%e A120740 n = 36 -> k = 279 -> 279*abs(36-279)=279*243=67797 -> 6+7+7+9+7 = 36
%p A120740 P:=proc(n) local i, j, k, w; for i from 0 by 1 to n do for j from 0 by 1 to 100*n do w:=0; k:=j*abs(i-j); while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; if w=i then print(i); break; fi; od; od; end: P(100000);
%Y A120740 Cf. A130877.
%K A120740 nonn,base
%O A120740 1,2
%A A120740 _Paolo P. Lava_ and _Giorgio Balzarotti_, Jul 26 2007