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.

A126590 Multiples of 3 or 5 but not both.

Original entry on oeis.org

3, 5, 6, 9, 10, 12, 18, 20, 21, 24, 25, 27, 33, 35, 36, 39, 40, 42, 48, 50, 51, 54, 55, 57, 63, 65, 66, 69, 70, 72, 78, 80, 81, 84, 85, 87, 93, 95, 96, 99, 100, 102, 108, 110, 111, 114, 115, 117, 123, 125, 126, 129, 130, 132, 138, 140, 141, 144, 145, 147, 153, 155, 156
Offset: 1

Views

Author

Zak Seidov, Mar 13 2007

Keywords

Comments

Numbers n such that (n mod 3)*(n mod 5) = 0 and n mod 15 > 0.

Examples

			3, 5, 6, 9, 10, 12, (not 15), 18, 20, 21, 24, 25, 27, (not 30), 33, etc.
		

Crossrefs

Programs

  • Magma
    I:=[3,5,6,9,10,12,18]; [n le 7 select I[n] else Self(n-1) + Self(n-6) - Self(n-7): n in [1..70]]; // G. C. Greubel, Mar 06 2018
  • Mathematica
    s={}; Do[m3=Mod[n,3]; m5=Mod[n,5]; m15=Mod[n,15]; If[m3*m5==0&&m15>0,AppendTo[s,n]],{n,200}]; s
  • PARI
    is(n)=isprime(gcd(n,15)) \\ Charles R Greathouse IV, Oct 11 2013
    

Formula

a(n) = a(n-1) + a(n-6) - a(n-7). - Charles R Greathouse IV, Oct 11 2013