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.

A182538 a(n) = (a(n-1) AND a(n-2)) + n.

This page as a plain text file.
%I A182538 #25 May 21 2025 10:43:00
%S A182538 0,1,2,3,6,7,12,11,16,9,10,19,14,15,28,27,40,25,26,43,30,31,52,43,56,
%T A182538 65,26,27,54,47,68,35,32,65,34,35,70,39,44,75,48,41,74,51,46,79,60,59,
%U A182538 104,89,122,139,62,63,116,107,152,65,58,59,118,111,164,99,96,161,98,99,166,103
%N A182538 a(n) = (a(n-1) AND a(n-2)) + n.
%H A182538 Iain Fox, <a href="/A182538/b182538.txt">Table of n, a(n) for n = 0..10000</a>
%F A182538 a(0)=0, a(1)=1, a(n)=(a(n-1) AND a(n-2)) + n, where AND is the bitwise AND operator.
%o A182538 (Python)
%o A182538 prpr, prev = 0,1
%o A182538 for n in range(2,99):
%o A182538   current = (prpr & prev) + n
%o A182538   print(prpr, end=', ')
%o A182538   prpr, prev = prev, current
%o A182538 (PARI) first(n)=my(res=vector(n,i,i-1)); for(x=3, n, res[x]=bitand(res[x-1],res[x-2])+x-1); res \\ _Iain Fox_, Nov 05 2018
%Y A182538 Cf. A182536.
%K A182538 nonn,base,look,easy
%O A182538 0,3
%A A182538 _Alex Ratushnyak_, May 04 2012