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.

A091685 Sieve out 6n+1 and 6n-1.

This page as a plain text file.
%I A091685 #67 Sep 09 2024 08:49:48
%S A091685 0,1,0,0,0,5,0,7,0,0,0,11,0,13,0,0,0,17,0,19,0,0,0,23,0,25,0,0,0,29,0,
%T A091685 31,0,0,0,35,0,37,0,0,0,41,0,43,0,0,0,47,0,49,0,0,0,53,0,55,0,0,0,59,
%U A091685 0,61,0,0,0,65,0,67,0,0,0,71,0,73,0,0,0,77,0,79,0,0,0,83,0,85,0,0,0,89,0
%N A091685 Sieve out 6n+1 and 6n-1.
%C A091685 Completely multiplicative with a(2) = a(3) = 0, a(p) = p otherwise. - _David W. Wilson_, Jun 12 2005
%H A091685 Antti Karttunen, <a href="/A091685/b091685.txt">Table of n, a(n) for n = 0..10000</a>
%H A091685 <a href="/index/Di#divseq">Index to divisibility sequences</a>.
%H A091685 <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,2,0,0,0,0,0,-1).
%F A091685 a(n) = -Product_{k=0..5} Sum_{j=1..n} w(6)^(kj), w(6) = e^(2*Pi*i/6), i = sqrt(-1).
%F A091685 G.f.: x*(x^2+1)*(x^8-x^6+6*x^4-x^2+1) / ( (x-1)^2 *(1+x)^2 *(1+x+x^2)^2 *(x^2-x+1)^2 ). - _R. J. Mathar_, Feb 14 2015
%F A091685 From _Amiram Eldar_, Dec 18 2023: (Start)
%F A091685 Dirichlet g.f.: zeta(s-1) * (1 - 1/2^(s-1)) * (1 - 1/3^(s-1)).
%F A091685 Sum_{k=1..n} a(k) ~ n^2/6. (End)
%t A091685 Table[n Boole[Or[# == 1, # == 5] &@ Mod[n, 6]], {n, 0, 90}] (* or *)
%t A091685 CoefficientList[Series[x (x^2 + 1) (x^8 - x^6 + 6 x^4 - x^2 + 1)/((x - 1)^2*(1 + x)^2*(1 + x + x^2)^2*(x^2 - x + 1)^2), {x, 0, 90}], x] (* _Michael De Vlieger_, Jul 24 2017 *)
%o A091685 (PARI) a(n)=if(gcd(n,6)==1,n,0) \\ _Charles R Greathouse IV_, Jun 28 2015
%o A091685 (Scheme) (define (A091685 n) (if (or (even? n) (zero? (modulo n 3))) 0 n)) ;; _Antti Karttunen_, Jul 24 2017
%o A091685 (Python)
%o A091685 from sympy import gcd
%o A091685 def a(n): return n if gcd(n, 6) == 1 else 0
%o A091685 print([a(n) for n in range(51)]) # _Indranil Ghosh_, Jul 26 2017
%Y A091685 Cf. A007310 (nonzero terms), A047229 (positions of zeros), A054500.
%K A091685 easy,nonn,mult
%O A091685 0,6
%A A091685 _Paul Barry_, Jan 28 2004