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.

A260734 a(n) = number of steps needed to reach (n^2)-1 when starting from k = ((n+1)^2)-1 and repeatedly applying the map that replaces k with k - A002828(k), where A002828(k) = the least number of squares that add up to k.

This page as a plain text file.
%I A260734 #12 Mar 30 2017 22:00:10
%S A260734 1,2,2,4,4,5,5,7,7,7,8,10,9,10,10,13,13,14,13,15,15,16,17,17,19,19,19,
%T A260734 20,20,22,22,23,24,25,24,26,27,25,28,29,29,29,30,31,33,33,33,34,35,35,
%U A260734 37,36,39,37,38,40,42,40,42,42,43,42,45,45,45,48,45,49,50,50,48,53,50,51,54,52,53,54,56,56,56,58,59,59,60,60,60,61,62,62,62,65,66,66,65
%N A260734 a(n) = number of steps needed to reach (n^2)-1 when starting from k = ((n+1)^2)-1 and repeatedly applying the map that replaces k with k - A002828(k), where A002828(k) = the least number of squares that add up to k.
%H A260734 Antti Karttunen, <a href="/A260734/b260734.txt">Table of n, a(n) for n = 1..1024</a>
%F A260734 a(n) = A260731(((n+1)^2)-1) - A260731((n^2)-1). [The definition.]
%F A260734 Equally, for all n >= 1:
%F A260734 a(n) = A260731((n+1)^2) - A260731(n^2).
%F A260734 a(n) = A260732(n+1) - A260732(n).
%F A260734 a(n) = A260733(n+1) - A260733(n).
%t A260734 Table[Length[#] - 1 &@ NestWhileList[# - (If[First@ # > 0, 1, Length[ First@ Split@ #] + 1] &@ SquaresR[Range@ 4, #]) &, ((n + 1)^2) - 1, # != (n^2) - 1 &], {n, 95}] (* _Michael De Vlieger_, Sep 08 2016, after _Harvey P. Dale_ at A002828 *)
%o A260734 (Scheme, three variants, the first one utilizing memoization-macro definec)
%o A260734 (definec (A260734 n) (let ((end (- (A000290 n) 1))) (let loop ((k (- (A000290 (+ 1 n)) 1)) (s 0)) (if (= k end) s (loop (A255131 k) (+ 1 s))))))
%o A260734 (define (A260734 n) (- (A260731 (A000290 (+ 1 n))) (A260731 (A000290 n))))
%o A260734 (define (A260734 n) (- (A260733 (+ 1 n)) (A260733 n)))
%Y A260734 First differences of both A260732 and A260733.
%Y A260734 Cf. A000290, A002828, A255131.
%Y A260734 Cf. also A261224.
%K A260734 nonn
%O A260734 1,2
%A A260734 _Antti Karttunen_, Aug 12 2015