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.

Previous Showing 31-40 of 77 results. Next

A160545 Numbers coprime to 21.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, 20, 22, 23, 25, 26, 29, 31, 32, 34, 37, 38, 40, 41, 43, 44, 46, 47, 50, 52, 53, 55, 58, 59, 61, 62, 64, 65, 67, 68, 71, 73, 74, 76, 79, 80, 82, 83, 85, 86, 88, 89, 92, 94, 95, 97, 100, 101, 103, 104, 106, 107, 109, 110, 113, 115, 116
Offset: 1

Views

Author

Zerinvary Lajos, May 18 2009

Keywords

Comments

The asymptotic density of this sequence is 4/7. - Amiram Eldar, Oct 23 2020

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,0,0,0,0,0,0,0,0,0,0,1,-1}, {1,2,4,5,8,10,11,13,16,17,19,20,22},67] (* Ray Chandler, Jul 15 2015 *)
    Select[Range[100], CoprimeQ[21, #] &] (* Amiram Eldar, Oct 23 2020 *)
  • Sage
    [i for i in range(0,128) if gcd(21, i) == 1]

Formula

a(n+12) = a(n) + 21.
a(n) = 21*floor((n-1)/12)+f(n)+floor(f(n)/2)+2^floor(f(n)/4)+floor(((n+5) mod 12)/11)+floor(((n+3) mod 12)/11), where f(n)= (n-1) mod 12. - Gary Detlefs, Sep 22 2013
G.f.: x*(1+x+2*x^2+x^3+3*x^4+2*x^5+x^6+2*x^7+3*x^8+x^9+2*x^10+x^11+x^12) / ( (1+x) *(1+x^2) *(1+x+x^2) *(x^2-x+1) *(x^4-x^2+1) *(x-1)^2 ). - R. J. Mathar, Sep 27 2014

Extensions

Definition corrected by Leroy Quet, Jun 19 2009

A217562 Even numbers not divisible by 5.

Original entry on oeis.org

2, 4, 6, 8, 12, 14, 16, 18, 22, 24, 26, 28, 32, 34, 36, 38, 42, 44, 46, 48, 52, 54, 56, 58, 62, 64, 66, 68, 72, 74, 76, 78, 82, 84, 86, 88, 92, 94, 96, 98, 102, 104, 106, 108, 112, 114, 116, 118, 122, 124, 126, 128, 132
Offset: 1

Views

Author

Jeremy Gardiner, Oct 06 2012

Keywords

Comments

Numbers ending with 2,4,6,8 in base 10.
No term is divisible by 10 therefore a subsequence of A067251 (Numbers with no trailing zeros in decimal representation).
Union of this sequence with A005408 (The odd numbers) gives A067251.
Union of this sequence with A045572 (Numbers that are odd but not divisible by 5) gives A047201.
The even numbers divisible by 5 are A008592 (Multiples of 10).

Crossrefs

Programs

  • BASIC
    for n=1 to 199
    if n mod 5 <> 0 and n mod 2 <> 1 then print str$(n)+", ";
    next n
    print
    
  • Magma
    I:=[2, 4, 6, 8, 12]; [n le 5 select I[n] else Self(n-1) + Self(n-4) - Self(n-5): n in [1..60]]; // Vincenzo Librandi, Dec 28 2012
    
  • Mathematica
    CoefficientList[Series[2*(1 + x + x^2 + x^3 + x^4)/((1 + x)*(1 + x^2)*(x - 1)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Dec 28 2012 *)
  • PARI
    A217562(n)=(n-1)*5\2+2 \\ M. F. Hasler, Oct 07 2012
    
  • Python
    def A217562(n): return (5*n-1>>1)&-2 # Chai Wah Wu, Apr 21 2025

Formula

a(n) = 2*A047201(n).
G.f.: 2*x*(1+x+x^2+x^3+x^4) / ( (1+x)*(1+x^2)*(x-1)^2 ). - R. J. Mathar, Oct 06 2012
a(n) = 2*(n+floor((n-1)/4)). - Aaron J Grech, Sep 28 2024
E.g.f.: (4 - cos(x) + (5*x - 3)*cosh(x) + sin(x) + (5*x - 2)*sinh(x))/2. - Stefano Spezia, Sep 28 2024

A053795 Composite numbers ending in 1, 3, 7 or 9.

Original entry on oeis.org

9, 21, 27, 33, 39, 49, 51, 57, 63, 69, 77, 81, 87, 91, 93, 99, 111, 117, 119, 121, 123, 129, 133, 141, 143, 147, 153, 159, 161, 169, 171, 177, 183, 187, 189, 201, 203, 207, 209, 213, 217, 219, 221, 231, 237, 243, 247, 249, 253, 259, 261, 267, 273, 279, 287
Offset: 1

Views

Author

G. L. Honaker, Jr., Apr 01 2000

Keywords

Comments

Composite numbers not divisible by 2 or 5. - Lekraj Beedassy, Jul 05 2004
Composite numbers ending in 1, 3, 7 or 9 are values (some shared within sets, because some values are numbers with multiple factors) of the following sets of binomial products:
{(10x+3)*(10y+7), (10x+9)*(10y+9), (10x+11)*(10y+11)}, {(10x+3)*(10y+11), (10x+7)*(10y+9)},
{(10x+3)*(10y+9), (10x+7)*(10y+11)}, and
{(10x+3)*(10y+3), (10x+7)*(10y+7), (10x+9)*(10y+11)}, with x, y integers >= 0. - Marvin Y. Hubble, Jul 12 2013 and May 12 2014 and Sep 27 2019

Crossrefs

Subsequence of A045572.

Programs

  • Maple
    remove(isprime, [seq(seq(10*i+j,j=[3,7,9,11]),i=0..100)]); # Robert Israel, Jan 29 2018
  • Mathematica
    Select[Range[300],CompositeQ[#]&&OddQ[#]&&!Divisible[#,5]&] (* Harvey P. Dale, Jul 13 2014 *)
  • PARI
    is(n)=gcd(n,10)==1 && !isprime(n) && n>1 \\ Charles R Greathouse IV, Jan 30 2018
    
  • Python
    from sympy import isprime
    def ok(n): return n > 1 and n%10 in {1, 3, 7, 9} and not isprime(n)
    print(list(filter(ok, range(2, 288)))) # Michael S. Branicky, Sep 21 2021

Formula

a(n) = 2.5n + 2.5n/log n + O(n/log^2 n). - Charles R Greathouse IV, Jan 30 2018

Extensions

More terms from James Sellers, Apr 08 2000
Offset corrected by Arkadiusz Wesolowski, Dec 18 2011

A204454 Odd numbers not divisible by 11.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 123, 125, 127, 129, 131
Offset: 1

Views

Author

Wolfdieter Lang, Jan 24 2012

Keywords

Comments

Up to a(45) this sequence coincides with A029740, but 101 is not in A029740.
This sequence is the fourth member of the family of sequences of odd numbers not divisible by a given odd prime p. For p = 3, 5, and 7 these sequences are A007310, A045572, and A162699, respectively. The formula is
a(p;n) = 2*n+1 + 2*floor((n-(p+1)/2)/(p-1)), n>=1, p an odd prime. If one puts a(p;0):=0, the o.g.f. is
G(p;x) = (x/((1-x^(p-1))*(1-x)))*(1 + 2*sum(x^k,k=1..(p-3)/2) + 4*x^((p-1)/2) + 2*sum(x^((p-1)/2+k),k=1..(p-3)/2) + x^(p-1)).
See the array A204456 with the coefficients of the numerator polynomials of these o.g.f.s.
This sequence gives also the numbers relatively prime to 2 and 11.
Another formula is a(p;n) = 2*n-1 + 2*floor(( n-(p-3)/2)/(p-1)), n>=1. From the rows of the array A204456 for the o.g.f. one can show first: a(p;n) = n + sum(floor((n+p-3-k)/(p-1)),k=1..(p-3)/2) + 3*floor((n+(p-3)/2)/(p-1)) + sum(floor((n+(p-3)/2-k)/(p-1)),k=1..(p-1)/2), p an odd prime, n>=1. - Wolfdieter Lang, Jan 26 2012
Recurrences for odd p: a(p;n) = a(p;n-(p-1)) + 2*p. For first differences: a(p;n) = a(p;n-1) + a(p;n-p+1) - a(p;n-p), n>=p, and inputs a(p;0):=-1 (here not 0) and a(p;k) for k=1,...,p-1. See the formula sections of the A-numbers for the instances p = 3, 5, and 7 for the contributions from Zak Seidov and R. J. Mathar. From this recurrence follows the o.g.f. (starting with x^1) directly. Above it has been found from the formula for a(p;n). Here the coefficients of the numerator polynomial of the o.g.f. (besides the 1s for x^1 and x^p) arise as first differences of the input members of the {a(p;n)} sequence. - Wolfdieter Lang, Jan 27 2012
Numbers coprime to 22. The asymptotic density of this sequence is 5/11. - Amiram Eldar, Oct 20 2020

Examples

			2*floor((n-6)/10), n>=0, is the sequence (the exponent of a number indicates how many times this number appears consecutively): (-2)^6 0^10 2^10 4^10 ... By adding these numbers to 2*n+1, n>=0, one obtains -1 for n=0 and a(n) for n>=1. The o.g.f is computed from this sum, but adjusted such that one obtains a vanishing a(0).
Recurrences: 31 = a(15) = a(5) + 2*11 = 9 + 22. a(15) = a(14) + a(5) - a(4) = 29 + 9 - 7 = 31. - _Wolfdieter Lang_, Jan 27 2012
		

Crossrefs

Programs

Formula

a(n) = 2*n+1 + 2*floor((n-6)/10), n>=1. Note that this is -1 for n=0, but the following o.g.f. uses a(0)=0.
O.g.f: x*(1+2*x+2*x^2+2*x^3+2*x^4+4*x^5+2*x^6+2*x^7+2*x^8+2*x^9+x^10)/((1-x^10)*(1-x)). See the comment above for p=11.
a(n) = n + sum(floor((n+9-k)/10),k=1..4) + 3*floor((n+4)/10) + sum(floor((n+4-k)/10),k=1..5) = n + (n-1) + 2*floor((n+4)/10), n>=1. See the line m=5, p=11 of the array A204456, and the general formula given in a comment above. - Wolfdieter Lang, Jan 26 2012
Recurrences: a(n) = a(n-10) + 2*11. First differences: a(n) = a(n-1) + a(n-10) - a(n-11), n>=11, and inputs a(p;0):=-1 ( here not 0) and a(p;k) for k=1,...,10. See the general comment above. - Wolfdieter Lang, Jan 27 2012

A235933 Numbers coprime to 35.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 11, 12, 13, 16, 17, 18, 19, 22, 23, 24, 26, 27, 29, 31, 32, 33, 34, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 51, 52, 53, 54, 57, 58, 59, 61, 62, 64, 66, 67, 68, 69, 71, 72, 73, 74, 76, 78, 79, 81, 82, 83, 86, 87, 88, 89, 92, 93, 94, 96, 97, 99
Offset: 1

Views

Author

Oleg P. Kirillov, Jan 17 2014

Keywords

Comments

The asymptotic density of this sequence is 24/35. - Amiram Eldar, Oct 23 2020

Crossrefs

Cf. A160547 (numbers coprime to 31), A229968 (numbers coprime to 33), A204458 (numbers coprime to 34), A007310 (numbers coprime to 36).
Cf. A045572 (numbers not divisible by 5 or 2), A229829 (numbers not divisible by 5 or 3), A047201 (numbers not divisible by 5), A236207 (numbers not divisible by 5 or 11).

Programs

  • Haskell
    a235933 n = a235933_list !! (n-1)
    a235933_list = filter ((== 1) . gcd 35) [1..]
    -- Reinhard Zumkeller, Mar 27 2014
  • Magma
    [n: n in [1..100] | GCD(n,35) eq 1]; // Bruno Berselli, Mar 27 2014
    
  • Mathematica
    Select[Range[100], GCD[#, 35] == 1 &] (* Bruno Berselli, Mar 27 2014 *)
  • Sage
    [i for i in range(100) if gcd(i, 35) == 1] # Bruno Berselli, Mar 27 2014
    

Extensions

Signature corrected from Georg Fischer, Feb 07 2021
Erroneous recurrence removed from Bruno Berselli, Feb 08 2021

A267541 Expansion of (2 + 4*x + x^2 + x^3 + 2*x^4 + x^5)/(1 - x - x^5 + x^6).

Original entry on oeis.org

2, 6, 7, 8, 10, 13, 17, 18, 19, 21, 24, 28, 29, 30, 32, 35, 39, 40, 41, 43, 46, 50, 51, 52, 54, 57, 61, 62, 63, 65, 68, 72, 73, 74, 76, 79, 83, 84, 85, 87, 90, 94, 95, 96, 98, 101, 105, 106, 107, 109, 112, 116, 117, 118, 120, 123, 127, 128, 129, 131, 134, 138, 139, 140
Offset: 0

Views

Author

Bruno Berselli, Jan 16 2016

Keywords

Comments

Also, numbers that are congruent to {2, 6, 7, 8, 10} mod 11.
(m^k+1)/11 is a nonnegative integer when
. m is a member of this sequence and k is an odd multiple of 5 (A017329),
. m is a member of A017509 and k is odd but not multiple of 5 (A045572).
If k is even, (m^k+1)/11 is never an integer.
The product of two terms does not belong to the sequence.

Examples

			From the linear recurrence:
(-A267755) ..., -12, -9, -5, -4, -3, -1, 2, 6, 7, 8, 10, 13, ... (A267541)
		

Crossrefs

Cf. A088225: numbers congruent to {2,6,7,8} mod 11.

Programs

  • Magma
    m:=70; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((2+4*x+x^2+x^3+2*x^4+x^5)/(1-x-x^5+x^6)));
    
  • Maple
    gf := (2+4*x+x^2+x^3+2*x^4+x^5)/((1-x)^2*(1+x+x^2+x^3+ x^4)): deg := 64: series(gf,x,deg): seq(coeff(%,x,n), n=0..deg-1); # Peter Luschny, Jan 19 2016
  • Mathematica
    CoefficientList[Series[(2 + 4 x + x^2 + x^3 + 2 x^4 + x^5)/(1 - x - x^5 + x^6), {x, 0, 70}], x]
    LinearRecurrence[{1, 0, 0, 0, 1, -1}, {2, 6, 7, 8, 10, 13}, 70]
    Select[Range[150], MemberQ[{2, 6, 7, 8, 10}, Mod[#, 11]]&]
  • PARI
    Vec((2+4*x+x^2+x^3+2*x^4+x^5)/(1-x-x^5+x^6)+O(x^70))
    
  • Sage
    gf = (2+4*x+x^2+x^3+2*x^4+x^5)/((1-x)^2*(1+x+x^2+x^3+ x^4))
    print(taylor(gf, x, 0, 63).list()) # Peter Luschny, Jan 19 2016

Formula

G.f.: (2 + 4*x + x^2 + x^3 + 2*x^4 + x^5)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(n-1) + a(n-5) - a(n-6).
a(-n) = -A267755(n-1).

A338715 Smallest prime ending with decimal expansion of n, for n relatively prime to 10.

Original entry on oeis.org

11, 3, 7, 19, 11, 13, 17, 19, 421, 23, 127, 29, 31, 233, 37, 139, 41, 43, 47, 149, 151, 53, 157, 59, 61, 163, 67, 269, 71, 73, 277, 79, 181, 83, 487, 89, 191, 193, 97, 199, 101, 103, 107, 109, 2111, 113, 1117, 3119, 3121, 1123, 127, 1129, 131, 4133, 137, 139, 2141, 2143, 5147, 149, 151, 1153, 157
Offset: 1

Views

Author

N. J. A. Sloane, Nov 11 2020

Keywords

Comments

a(n) exists by Dirichlet's theorem.

Crossrefs

Cf. A045572, A105888 (base 2 equivalent), A258190.
See A245193, A337834, A338716 for other versions.

Programs

  • Maple
    N:= 100: # for a(1) to a(N)
    V:= Vector(N):
    count:= 0:
    for n from 1 while count < N do
      if igcd(n,10)=1 then
        count:= count+1;
        d:= ilog10(n)+1;
        for x from n by 10^d do
          if isprime(x) then V[count]:= x; break fi
        od
      fi
    od:
    convert(V,list); # Robert Israel, Nov 11 2020
  • Python
    from sympy import isprime
    def a(n):
        ending = 2*n - 1 + (n+1)//4 * 2 # A045572
        i, pow10 = ending, 10**len(str(ending))
        while not isprime(i): i += pow10
        return i
    print([a(n) for n in range(1, 64)]) # Michael S. Branicky, Nov 03 2021

Extensions

More terms from Robert Israel, Nov 11 2020

A028375 Squares of (odd numbers not divisible by 5).

Original entry on oeis.org

1, 9, 49, 81, 121, 169, 289, 361, 441, 529, 729, 841, 961, 1089, 1369, 1521, 1681, 1849, 2209, 2401, 2601, 2809, 3249, 3481, 3721, 3969, 4489, 4761, 5041, 5329, 5929, 6241, 6561, 6889, 7569, 7921, 8281, 8649, 9409, 9801, 10201, 10609, 11449, 11881, 12321
Offset: 1

Views

Author

ems (nibor(AT)ix.netcom.com)

Keywords

Comments

Catalan stated empirically that the triple of any odd square not divisible by 5 is a sum of squares of three primes other than 2 and 3. - Jonathan Vos Post, Mar 03 2010 [Reference?]

Programs

  • Mathematica
    Select[Range[1, 191, 2], Mod[#, 5] != 0 &]^2 (* or *) LinearRecurrence[{1, 0, 0, 2, -2, 0, 0, -1, 1}, {1, 9, 49, 81, 121, 169, 289, 361, 441}, 50] (* Harvey P. Dale, Feb 26 2017 *)
    Complement[2Range[100] - 1, 5Range[20]]^2 (* Alonso del Arte, Dec 23 2019 *)
  • Scala
    ((1 to 99 by 2).diff(5 to 100 by 5)).map(n => (n * n)) // Alonso del Arte, Dec 23 2019

Formula

a(n) = (A045572(n))^2.
a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9). - R. J. Mathar, Sep 22 2009
G.f.: x*(1 + 8*x + 40*x^2 + 32*x^3 + 38*x^4 + 32*x^5 + 40*x^6 + 8*x^7 + x^8)/((1 + x)^2 * (x^2 + 1)^2 * (1 - x)^3). - R. J. Mathar, Sep 22 2009
Sum_{n>=1} 1/a(n) = 3*Pi^2/25. - Amiram Eldar, Dec 19 2020

Extensions

Definition corrected by R. J. Mathar, Sep 22 2009

A085820 Possible two-digit endings of primes (with leading zeros).

Original entry on oeis.org

1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39, 41, 43, 47, 49, 51, 53, 57, 59, 61, 63, 67, 69, 71, 73, 77, 79, 81, 83, 87, 89, 91, 93, 97, 99
Offset: 1

Views

Author

Zak Seidov, Jul 04 2003

Keywords

Comments

This is a finite sequence which contains the first few terms of A045572.
Smallest prime > A085820(n) ending with A085820(n) in A085821.

Crossrefs

Cf. A085821.

Programs

  • Mathematica
    Mod[Prime[Range[5,1000]],100]//Union (* Harvey P. Dale, Jul 10 2017 *)
  • Sage
    [x for x in range(100) if kronecker(x^2,100)==1] # Zerinvary Lajos, Dec 07 2009

A088629 Smallest number k not included earlier such that the concatenation n, k is a prime.

Original entry on oeis.org

1, 3, 7, 19, 9, 13, 27, 11, 29, 21, 17, 23, 61, 33, 31, 37, 41, 47, 49, 39, 43, 51, 57, 59, 79, 63, 53, 87, 69, 67, 81, 71, 73, 91, 83, 77, 93, 89, 103, 99, 113, 97, 117, 101, 119, 133, 111, 109, 121, 123, 131, 127, 129, 139, 147, 149, 107, 151, 141, 161, 153, 137, 179
Offset: 1

Views

Author

Amarnath Murthy, Oct 21 2003

Keywords

Comments

Another rearrangement of odd numbers not == 0 (mod 5).

Examples

			a(4) = 19. Though 41, 43 and 47 are prime 1, 3 and 7 have been included earlier and also 49, 411, 413 and 417 are not prime hence 419 is the required prime.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen():
        aset, mink = set(), 1
        for n in count(1):
            s, k = str(n), mink
            while k in aset or not isprime(int(s + str(k))): k += 1
            while mink%5 == 0 or mink in aset: mink += 2
            yield k; aset.add(k)
    print(list(islice(agen(), 63))) # Michael S. Branicky, Aug 20 2022

Extensions

More terms from Ray G. Opao, Aug 19 2004
Previous Showing 31-40 of 77 results. Next