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.

A064866 Write numbers 1, then 1 up to 2^2, then 1 up to 3^2, then 1 up to 4^2 and so on.

This page as a plain text file.
%I A064866 #44 Nov 05 2024 12:17:26
%S A064866 1,1,2,3,4,1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,1,
%T A064866 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,1,2,
%U A064866 3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28
%N A064866 Write numbers 1, then 1 up to 2^2, then 1 up to 3^2, then 1 up to 4^2 and so on.
%C A064866 This is a fractal sequence: if the first instance of each number is deleted, the original sequence is recovered. - _Franklin T. Adams-Watters_, Dec 14 2013
%C A064866 Subsequences start at indices A000330 + 1. - _Ralf Stephan_, Dec 17 2013
%C A064866 When sequence fills a triangular array by rows, the main diagonal is A064865:
%C A064866 This triangle begins:
%C A064866      1
%C A064866     1 2
%C A064866    3 4 1
%C A064866   2 3 4 5
%C A064866  6 7 8 9 1
%C A064866 From _Antti Karttunen_, Feb 17 2014: (Start)
%C A064866 A more natural way of organizing this sequence is as an irregular table consisting of successively larger square matrices:
%C A064866    1;
%C A064866    1, 2;
%C A064866    3, 4;
%C A064866    1, 2, 3;
%C A064866    4, 5, 6;
%C A064866    7, 8, 9;
%C A064866    1, 2, 3, 4;
%C A064866    5, 6, 7, 8;
%C A064866    9,10,11,12;
%C A064866   13,14,15,16;
%C A064866   etc.
%C A064866 (End)
%F A064866 a(n) = A237451(n) + (A237452(n)*A074279(n)) + 1. - _M. F. Hasler_, Feb 17 2014
%F A064866 For 1 <= n <= 650, a(n) = n - t(t-1)(2t-1)/6, where t = floor((3*n)^(1/3)+1/2). - _Mikael Aaltonen_, Jan 17 2015
%F A064866 a(n) = n-k(k-1)(2k-1)/6 where k = m+1 if n>m(m+1)(2m+1)/6 and k = m otherwise and m = floor((3n)^(1/3)). - _Chai Wah Wu_, Nov 05 2024
%t A064866 Table[Range[n^2],{n,10}]//Flatten (* _Harvey P. Dale_, Mar 05 2018 *)
%o A064866 (PARI) A064866_vec(N=9)=concat(vector(N, i, vector(i^2, j, j))) \\ Note: This creates a vector; use A064866_vec()[n] to get the n-th term. - _M. F. Hasler_, Feb 17 2014
%o A064866 (Python)
%o A064866 from sympy import integer_nthroot
%o A064866 def A064866(n): return n-(k:=(m:=integer_nthroot(3*n,3)[0])+(6*n>m*(m+1)*((m<<1)+1)))*(k-1)*((k<<1)-1)//6 # _Chai Wah Wu_, Nov 04 2024
%Y A064866 Cf. A002260, A002262, A002024.
%Y A064866 Cf. A074279, A121997, A238013, A237451, A237452.
%Y A064866 Mini-index to these sequences: A064766, A064865, A064866, A065221-A655234 are all of the same type. See A064766 for a detailed explanation.
%K A064866 easy,nonn,tabl
%O A064866 1,3
%A A064866 _Floor van Lamoen_, Oct 08 2001
%E A064866 Edited by _Ralf Stephan_, Dec 17 2013