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.
%I A273514 #38 Nov 22 2018 20:22:53 %S A273514 0,0,2,0,0,2,2,2,2,0,0,2,0,0,2,2,2,2,2,2,8,2,2,2,2,2,2,0,0,2,0,0,2,2, %T A273514 2,2,0,0,2,0,0,2,2,2,2,2,2,8,2,2,2,2,2,2,2,2,8,2,2,8,8,8,8,2,2,8,2,2, %U A273514 2,2,2,2,2,2,8,2,2,2,2,2,2,0,0,2,0,0,2 %N A273514 a(n) is the number of arithmetic progressions m < n < p (three numbers in arithmetic progression) such that m and p contain no 2's in their ternary representation. %C A273514 This is a recursive sequence that gives the number of times n is rejected from A005836, if n is the middle member of an arithmetic triple whose first and last terms are contained in A005836. %C A273514 Also, a(n) is the number of unordered pairs of members of A005836 whose average (arithmetic mean) is n. %C A273514 It appears that when A273513(n) and A262097(n) are coprime, a(n) = 2. %C A273514 Local maxima occur at a(A125857(n)). %H A273514 Max Barrentine, <a href="/A273514/b273514.txt">Table of n, a(n) for n = 0..19683</a> %F A273514 a(0) = 0, a(n) = a(3n) = a(3n+1); if a(n) = 0, a(9n + 2) = 2, otherwise a(9n + 2) = 4a(n); a(9n + 5) = a(9n + 6) = a(9n + 7) = a(9n + 8) = a(3n + 2). %e A273514 a(2) = 2 because there are two arithmetic triples a < 2 < b such that a and b are members of A005836: 0, 2, 4 and 1, 2, 3. %o A273514 (PARI) precCantor(n)=my(v=digits(n,3)); for(i=1,#v, if(v[i]==2, for(j=i,#v,v[j]=1); break)); fromdigits(v,2) %o A273514 a(n)=if(n==0, return(0)); sum(i=0,precCantor(n-1), my(m=fromdigits(digits(i,2),3)); vecmax(digits(2*n-m,3))<2) \\ _Charles R Greathouse IV_, Jun 17 2016 %Y A273514 Cf. A005836, A125857, A262097, A273513. %K A273514 nonn,base %O A273514 0,3 %A A273514 _Max Barrentine_, May 23 2016