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.

Showing 1-4 of 4 results.

A264828 Nonprimes that are not twice a prime.

Original entry on oeis.org

1, 8, 9, 12, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 33, 35, 36, 39, 40, 42, 44, 45, 48, 49, 50, 51, 52, 54, 55, 56, 57, 60, 63, 64, 65, 66, 68, 69, 70, 72, 75, 76, 77, 78, 80, 81, 84, 85, 87, 88, 90, 91, 92, 93, 95, 96, 98, 99, 100, 102, 104
Offset: 1

Views

Author

Giovanni Teofilatto, Nov 26 2015

Keywords

Comments

Except for the initial 1, if n is in the sequence, so is k*n for all k > 1. So the odd semiprimes (A046315) and numbers of the form 4*p (A001749) where p is prime are core subsequences which give the initial terms of arithmetic progressions in this sequence. - Altug Alkan, Nov 29 2015

Crossrefs

Programs

  • Maple
    Primes, Nonprimes:= selectremove(isprime, {$1..1000}):
    sort(convert(Nonprimes minus map(`*`,Primes,2),list)); # Robert Israel, Nov 30 2015
  • Mathematica
    Select[Range@ 104, And[! PrimeQ@ #, Or[PrimeOmega@ # != 2, OddQ@ #]] &] (* Michael De Vlieger, Nov 27 2015 *)
    Select[Range@110, Nor[PrimeQ[#], PrimeQ[#/2]] &] (* Vincenzo Librandi, Jan 22 2016 *)
  • PARI
    print1(1, ", "); forcomposite(n=1, 1e3, if(n % 2 == 1 || !isprime(n/2), print1(n, ", "))) \\ Altug Alkan, Dec 01 2015
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A264828_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:not (isprime(n) or (n&1^1 and isprime(n>>1))),count(max(startvalue,1)))
    A264828_list = list(islice(A264828_gen(),20)) # Chai Wah Wu, Mar 26 2024
    
  • Python
    from sympy import primepi
    def A264828(n):
        def f(x): return int(n+primepi(x)+primepi(x>>1))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Oct 17 2024

Formula

a(n) = A009188(n-2) for n>=3. - Alois P. Heinz, Oct 17 2024

A271345 Integers n such that (n-1)! is divisible by n^3.

Original entry on oeis.org

1, 12, 18, 20, 24, 27, 28, 30, 32, 35, 36, 40, 42, 44, 45, 48, 49, 50, 52, 54, 55, 56, 60, 63, 64, 65, 66, 68, 70, 72, 75, 76, 77, 78, 80, 81, 84, 85, 88, 90, 91, 92, 95, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 115, 116, 117, 119, 120, 121, 124, 125, 126, 128, 130, 132, 133, 135
Offset: 1

Views

Author

Altug Alkan, Apr 04 2016

Keywords

Comments

Integers n such that A000142(n-1) is divisible by A000578(n).
Obviously, all terms are nonprime.
For n > 1, members of this sequence are short leg of more than one Pythagorean triangle.

Examples

			12 is a term because 11! is divisible 12^3.
		

Crossrefs

Programs

  • PARI
    lista(nn) = for(n=1, nn, if((n-1)! % (n^3) == 0, print1(n, ", ")));

A009185 Long leg of more than one Pythagorean triangle.

Original entry on oeis.org

12, 24, 36, 40, 45, 48, 56, 60, 63, 72, 80, 84, 90, 96, 105, 108, 112, 120, 126, 132, 135, 140, 144, 156, 160, 165, 168, 176, 180, 189, 192, 195, 200, 204, 208, 210, 216, 220, 224, 225, 228, 231, 240, 252, 255, 260, 264, 270, 272, 273, 275, 276, 280, 285, 288, 300, 304
Offset: 1

Views

Author

Keywords

Comments

If n is in the sequence, k*n is in the sequence for all k > 1. So sequence is union of arithmetic progressions such as numbers of the form 12*k, 40*k, 45*k, ... - Altug Alkan, Nov 30 2015
Numbers appearing more than once in A009012. - Sean A. Irvine, Apr 20 2018

Crossrefs

A265694 a(n) = n!! mod n^2 where n!! is a double factorial number (A006882).

Original entry on oeis.org

0, 2, 3, 8, 15, 12, 7, 0, 54, 40, 110, 0, 104, 84, 0, 0, 221, 0, 342, 0, 0, 220, 506, 0, 0, 312, 0, 0, 493, 0, 930, 0, 0, 544, 0, 0, 222, 684, 0, 0, 369, 0, 1806, 0, 0, 1012, 47, 0, 0, 0, 0, 0, 1590, 0, 0, 0, 0, 1624, 59, 0, 3050, 1860, 0, 0, 0, 0, 4422, 0, 0, 0
Offset: 1

Views

Author

Altug Alkan, Dec 13 2015

Keywords

Comments

Inspired by geometric meaning of distribution of 0's in this sequence.
Position of 0's in this sequence is directly related with sequence which gives the short leg of more than one Pythagorean triangle (A009188). See comment sections in A009188 and A264828 which are the related sequences for further information.
More precisely, a(A009188(n+1)) = 0 for n > 0.

Examples

			For n = 1, a(1) = 1!! mod 1^2 = 1 mod 1 = 0.
For n = 2, a(2) = 2!! mod 2^2 = 2 mod 4 = 2.
For n = 8, a(8) = 8!! mod 8^2 = 384 mod 64 = 0.
		

Crossrefs

Cf. A006882.

Programs

  • Magma
    DoubleFactorial:=func< n | &*[n..2 by -2] >; [ DoubleFactorial(n) mod n^2: n in [1..70] ]; // Vincenzo Librandi, Dec 14 2015
  • Mathematica
    Table[Mod[n!!, n^2], {n, 70}] (* Michael De Vlieger, Dec 14 2015 *)
  • PARI
    df(n) = if( n<0, 0, my(E); E = exp(x^2 / 2 + x * O(x^n)); n! * polcoeff( 1 + E * x * (1 + intformal(1 / E)), n));
    vector(70, n, df(n) % n^2)
    

Formula

a(A009188(n+1)) = 0 for n > 0.
Showing 1-4 of 4 results.