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.

A284625 Positions of 2 in A284749.

This page as a plain text file.
%I A284625 #25 May 23 2025 03:54:18
%S A284625 3,6,7,10,13,14,17,18,21,24,25,28,31,32,35,36,39,42,43,46,47,50,53,54,
%T A284625 57,60,61,64,65,68,71,72,75,78,79,82,83,86,89,90,93,94,97,100,101,104,
%U A284625 107,108,111,112,115,118,119,122,123,126,129,130,133,136,137
%N A284625 Positions of 2 in A284749.
%C A284625 This sequence and A214971 and A284624 partition the positive integers into sequences with slopes t = (5+sqrt(5))/2, u = (5+sqrt(5))/2, v = sqrt(5), where 1/t + 1/u + 1/v = 1.  The positions of 0 in A284749 are given by A214971, and of 1, by A284624.
%H A284625 Clark Kimberling, <a href="/A284625/b284625.txt">Table of n, a(n) for n = 1..10000</a>
%H A284625 J.-P. Allouche and F. M. Dekking, <a href="https://arxiv.org/abs/1809.03424">Generalized Beatty sequences and complementary triples</a>, arXiv:1809.03424v3 [math.NT], 2018-2019.
%F A284625 a(n) = 2*floor(n*phi) - n + 2  (Example 30 in Allouche and Dekking). - _Michel Dekking_, Oct 08 2018
%F A284625 a(n) = A050140(n)+2 - _Michel Dekking_, Oct 08 2018
%e A284625 As a word, A284749 = 012012201201220122..., in which 2 is in positions 3,6,7,10,...
%t A284625 s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 13]  (* A003849 *)
%t A284625 w = StringJoin[Map[ToString, s]]
%t A284625 w1 = StringReplace[w, {"001" -> "2"}]
%t A284625 st = ToCharacterCode[w1] - 48 (* A284749 *)
%t A284625 Flatten[Position[st, 0]]  (* A214971 *)
%t A284625 Flatten[Position[st, 1]]  (* A284624 *)
%t A284625 Flatten[Position[st, 2]]  (* A284625 *)
%o A284625 (Python)
%o A284625 from math import isqrt
%o A284625 def A284625(n): return (n+isqrt(5*n**2)&-2)-n+2 # _Chai Wah Wu_, May 22 2025
%Y A284625 Cf. A214971, A284625, A284749.
%K A284625 nonn,easy
%O A284625 1,1
%A A284625 _Clark Kimberling_, May 02 2017