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.

A176100 Even numbers that are not semiprimes, or, twice the nonprimes.

Original entry on oeis.org

0, 2, 8, 12, 16, 18, 20, 24, 28, 30, 32, 36, 40, 42, 44, 48, 50, 52, 54, 56, 60, 64, 66, 68, 70, 72, 76, 78, 80, 84, 88, 90, 92, 96, 98, 100, 102, 104, 108, 110, 112, 114, 116, 120, 124, 126, 128, 130, 132, 136, 138, 140, 144, 148, 150, 152, 154, 156, 160, 162, 164
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 08 2010, Apr 11 2010

Keywords

Crossrefs

Programs

  • Mathematica
    2 Prepend[Select[Range@ 82, ! PrimeQ@ # &], 0] (* Michael De Vlieger, Feb 20 2017 *)
  • PARI
    isok(n) = !(n%2) && !isprime(n/2); \\ Michel Marcus, Feb 20 2017

Formula

a(n)= 2*A141468(n).
a(n) = A139270(n-1). [R. J. Mathar, May 03 2010]

Extensions

Entries checked by R. J. Mathar, Apr 16 2010

A218243 Triangle numbers: m = a*b*c such that the integers a,b,c are the sides of a triangle with integer area.

Original entry on oeis.org

60, 150, 200, 480, 780, 1200, 1530, 1600, 1620, 1690, 1950, 2040, 2100, 2730, 2860, 3570, 3840, 4050, 4056, 4200, 4350, 4624, 5100, 5400, 5460, 6240, 7500, 8120, 8250, 8670, 8750, 9600, 10812, 11050, 11900, 12180, 12240, 12800, 12960, 13260, 13520, 13650
Offset: 1

Views

Author

Michel Lagneau, Oct 24 2012

Keywords

Comments

A triangle number m is an integer with at least one decomposition m = a*b*c such that the area of the triangle of sides (a,b,c) is an integer. Because this property is not always unique, we introduce the notion of "triangle order" for each triangle number m, denoted by TO(m). For example, TO(60) = 1 because the decomposition 60 = 3*4*5 is unique with the triangle (3,4,5) whose area A is given by Heron's formula: A = sqrt(s*(s-a)*(s-b)*(s-c)), where s = (a+b+c)/2 => A = sqrt(6*(6-3)*(6-4)*(6-5)) = 6, but TO(780) = 2 because 780 = 4*13*15 = 5*12*13 and the area of the triangle (4,13,15) is sqrt(16*(16-4)*(16-13)*(16-15)) = 24 and the area of the triangle (5,12,13) is sqrt(15*(15-5)*(15-12)*(15-13)) = 30.
Given an area A of A188158, there exists either a unique triangle number (for example for A = 6 => m = 60 = 3*4*5), or several triangle numbers (for example for A=60 => m1 = 4350 = 6*25*29, m2 = 2040 = 8*15*17, m3 = 1690 = 13*13*10).
The number of ways to write m = a*b*c with 1<=a<=b<=c<=m is given by A034836, thus: TO(m) <= A034836(m).
If n is in this sequence, so is nk^3 for any k > 0. Thus this sequence is infinite. - Charles R Greathouse IV, Oct 24 2012
In view of the preceding comment, one might call "primitive" the elements of the sequence for which there is no k>1 such that n/k^3 is again a term of the sequence. These elements 60, 150, 200, 780, 1530, 1690, 1950,... are listed in A218392. - M. F. Hasler, Oct 27 2012

Examples

			60 is in the sequence because 60 = 3*4*5 and the corresponding area is sqrt(6*(6-3)*(6-4)*(6-5)) = 6 = A188158(1).
		

Crossrefs

Subsequence of A139270.

Programs

  • Mathematica
    nn = 500; lst = {}; Do[s = (a + b + c)/2; If[IntegerQ[s], area2 = s (s - a) (s - b) (s - c); If[0 < area2 <= nn^2 && IntegerQ[Sqrt[area2]], AppendTo[lst, a*b*c]]], {a, nn}, {b, a}, {c, b}]; Union[lst] (* Program from T. D. Noe, adapted for this sequence - see A188158 *)
  • PARI
    Heron(a,b,c)=a*=a;b*=b;c*=c;((a+b+c)^2-2*(a^2+b^2+c^2))
    is(n)=fordiv(n,a, if(a^3<=n, next); fordiv(n/a,b, my(c=n/a/b,h); if(a>=b && b>=c && aCharles R Greathouse IV, Oct 24 2012

A256420 a(n) = 2n unless n is prime, in which case a(n) = first term not yet present in the sequence.

Original entry on oeis.org

2, 1, 3, 8, 4, 12, 5, 16, 18, 20, 6, 24, 7, 28, 30, 32, 9, 36, 10, 40, 42, 44, 11, 48, 50, 52, 54, 56, 13, 60, 14, 64, 66, 68, 70, 72, 15, 76, 78, 80, 17, 84, 19, 88, 90, 92, 21, 96, 98, 100, 102, 104, 22, 108, 110, 112, 114, 116, 23, 120
Offset: 1

Views

Author

N. J. A. Sloane, Apr 07 2015

Keywords

Comments

This is a permutation of the positive integers: twice nonprimes (A139270), interspersed with (odd numbers and twice primes, A256421).

References

  • John Mason, Email message, Apr 07 2015

Crossrefs

Programs

  • Maple
    N:= 100:
    S:= {$1..N}:
    R:= NULL;
    for n from 1 do
      if isprime(n) then if S = {} then break else t:= min(S) fi else t:= 2*n fi;
      R:= R, t;
      S:= S minus {t}
    od:
    R;
  • Python
    from sympy import primepi, isprime
    def A256420(n):
        r = int(primepi(n))
        def iterfun(f,n=0):
            m, k = n, f(n)
            while m != k: m, k = k, f(k)
            return m
        def f(x): return int(r+(m:=x>>1)-primepi(m))
        return iterfun(f,r) if isprime(n) else n<<1 # Chai Wah Wu, Oct 15 2024

A282671 Twice composite numbers.

Original entry on oeis.org

8, 12, 16, 18, 20, 24, 28, 30, 32, 36, 40, 42, 44, 48, 50, 52, 54, 56, 60, 64, 66, 68, 70, 72, 76, 78, 80, 84, 88, 90, 92, 96, 98, 100, 102, 104, 108, 110, 112, 114, 116, 120, 124, 126, 128, 130, 132, 136, 138, 140, 144, 148, 150, 152, 154, 156, 160, 162, 164, 168, 170, 172, 174
Offset: 1

Views

Author

Alessandro Polcini, Feb 20 2017

Keywords

Comments

Even numbers greater than 2 that do not appear in A001747.

Crossrefs

Programs

Formula

a(n) = 2*A002808(n). - R. J. Mathar, Feb 23 2017
a(n) = A139270(n+1). - R. J. Mathar, Feb 25 2017
Showing 1-4 of 4 results.