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.

A076768 Positive integers not expressible as the sum of a prime and a triangular number.

Original entry on oeis.org

1, 36, 105, 171, 210, 216, 325, 351, 406, 528, 561, 630, 741, 780, 990, 1081, 1176, 1275, 1596, 1711, 1830, 1953, 2016, 2145, 2346, 2628, 2775, 3003, 3081, 3240, 3321, 3655, 3741, 3916, 4278, 4371, 4465, 4560, 4851, 5253, 5460, 5565, 5886, 6105, 6216, 6786, 7021, 7140, 7503, 7626, 7750, 7875, 8256, 8515, 8911, 9045, 9591, 9870
Offset: 1

Views

Author

Jason Earls, Nov 14 2002

Keywords

Comments

It appears that 1,2,3,8 are the only positive integers that cannot be partitioned as the sum of a semiprime and a triangular number. Here triangular numbers include t(0)=0 and t(1)=1. - Jonathan Vos Post and Ray Chandler, Nov 28 2004
This sequence contains 216 (and possibly other nontriangular numbers) together with an infinite number of triangular numbers. The indices of the triangular numbers are in A138666. This is related to the Sun's conjecture (see A132399) that every number except 216 is the sum of a triangular number and a prime or 0. - T. D. Noe, Mar 26 2008

Examples

			a(2) = 36 is an element of this sequence because 36 cannot be written as a sum of one of the primes <= 36 {2,3,5,7,11,13,17,19,23,29,31} and one of the triangular numbers <= 36 {1,3,6,10,15,21,28,36}. - corrected (added 28) by _Gionata Neri_, May 02 2015
		

Crossrefs

Programs

  • Mathematica
    Complement[Range[9871],Total/@Tuples[{Prime[Range[1220]],Accumulate[ Range[ 0,140]]}]] (* Harvey P. Dale, Jul 30 2019 *)

Extensions

Added the terms 6786 through 9870 and conjecture that there are no further terms - Jonathan Vos Post and Ray Chandler, Nov 28 2004
Added "positive" to the name - Alex Ratushnyak, Apr 04 2013

A087401 Triangle of n*r-binomial(r+1,2).

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 2, 3, 3, 0, 3, 5, 6, 6, 0, 4, 7, 9, 10, 10, 0, 5, 9, 12, 14, 15, 15, 0, 6, 11, 15, 18, 20, 21, 21, 0, 7, 13, 18, 22, 25, 27, 28, 28, 0, 8, 15, 21, 26, 30, 33, 35, 36, 36, 0, 9, 17, 24, 30, 35, 39, 42, 44, 45, 45, 0, 10, 19, 27, 34, 40, 45, 49, 52, 54, 55, 55, 0, 11
Offset: 0

Views

Author

Paul Boddington, Oct 21 2003

Keywords

Comments

There is a curious connection with the character tables of cyclic groups of prime power order. Let G be a cyclic group of order p^n where p is prime and n is nonnegative. Construct an (n+1)x(n+1) matrix A whose rows and columns are indexed by the set 0,1,...,n as follows. The ij entry is obtained by taking any element of order p^(n-j) in G and summing its character values over all characters of order p^i in the dual group of G. Remarkably, all coefficients of the characteristic polynomial of A are powers of p (with alternating signs) and these powers can be read off from the appropriate row of our triangle. For example if n=2 then the characteristic polynomial is X^3 - p^2*X^2 + p^3*X - p^3.

Examples

			  0
  0   0
  0   1   1
  0   2   3   3
  0   3   5   6   6
  0   4   7   9  10  10
  0   5   9  12  14  15  15
  0   6  11  15  18  20  21  21
  0   7  13  18  22  25  27  28  28
  0   8  15  21  26  30  33  35  36  36
  0   9  17  24  30  35  39  42  44  45  45
		

Crossrefs

Cf. A138666.

Programs

  • Haskell
    a087401 n k = a087401_tabl !! n !! k
    a087401_row n = a087401_tabl !! n
    a087401_tabl = iterate f [0] where
       f row = row' ++ [last row'] where row' = zipWith (+) row [0..]
    -- Reinhard Zumkeller, Oct 03 2012
  • Maple
    A087401 := proc(n,k)
        n*k-binomial(k+1,2) ;
    end proc:
    seq(seq( A087401(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Jan 21 2015
  • Mathematica
    Table[n*r-Binomial[r+1,2],{n,0,20},{r,0,n}]//Flatten (* Harvey P. Dale, Jul 10 2020 *)

Formula

T(0,0)=0 and for n>0: T(n,k)=T(n-1,k)+k for kReinhard Zumkeller, Oct 03 2012

A241884 Numbers n such that n - n^2/k^2 is not prime for all k < n.

Original entry on oeis.org

1, 2, 5, 7, 9, 10, 11, 13, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 28, 29, 31, 33, 34, 35, 36, 37, 39, 40, 41, 43, 45, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 61, 63, 64, 65, 66, 67, 69, 70, 71, 73, 75, 76, 77, 78, 79, 81, 82, 83, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 99, 100
Offset: 1

Views

Author

Keywords

Comments

Conjecture: numbers n such that n-1 is not a prime number. - Vincenzo Librandi, Jul 16 2016
Counterexamples to conjecture: 56, 306, 552, 870, ... are not in the sequence. These are p^2+p where p is prime but p^2+p-1 is not prime. - Robert Israel, Jul 04 2017

Examples

			56 is not in the sequence because 56 - 56^2/8^2 = 7 is prime for k = 8.
		

Crossrefs

Cf. A008864, A036690, A138666 (numbers n such that 2n - n/k is not prime for all k), A242221.

Programs

  • Maple
    filter:= n -> andmap(t -> not isprime(n - t^2), numtheory:-divisors(n)):
    select(filter, [$1..1000]); # Robert Israel, Jul 04 2017
  • PARI
    isOK(n) = fordiv(n, k, if(isprime(n-(n/k)^2), return(0))); 1
    s=[]; for(n=1, 100, if(isOK(n), s=concat(s, n))); s \\ Colin Barker, May 16 2014

A242221 Numbers n such that n - n^2/m^2 and 2n - n/m are not prime for all m.

Original entry on oeis.org

1, 25, 26, 28, 33, 35, 39, 46, 50, 58, 63, 65, 77, 78, 81, 85, 86, 88, 92, 93, 94, 95, 105, 111, 116, 118, 119, 122, 123, 124, 125, 130, 133, 134, 143, 144, 145, 146, 148, 153, 155, 160, 161, 162, 165, 170, 171, 172, 176, 178, 183, 185, 186, 188, 189, 196, 202
Offset: 1

Views

Author

Keywords

Comments

Intersection of A241884 and A138666.

Examples

			26 is in this sequence because:
1) 26 - 26^2/1^2 = -650 and 2*26 - 26/1 = 26 both not prime for m = 1,
2) 26 - 26^2/2^2 = -143 and 2*26 - 26/2 = 39 both not prime for m = 2,
3) 26 - 26^2/13^2 = 22 and 2*26 - 26/13 = 50 both not prime for m = 13,
4) 26 - 26^2/26^2 = 25 and 2*26 - 26/26 = 51 both not prime for m = 26.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) andmap(t -> not isprime(n - n^2/t^2) and not isprime(2*n - n/t), numtheory:-divisors(n)) end proc:
    select(filter, [$1..200]); # Robert Israel, Jul 03 2017
  • Mathematica
    filterQ[n_] := AllTrue[Divisors[n], !PrimeQ[n - n^2/#^2] && !PrimeQ[2n - n/#]&];
    Select[Range[200], filterQ] (* Jean-François Alcover, Jul 27 2020, after Maple *)
  • PARI
    f(n)=fordiv(n, m, if(isprime(n-n^2/m^2), return(0))); 1
    g(n)=fordiv(n, m, if(isprime(2*n-n/m), return(0))); 1
    for(n=1, 200, if(f(n) && g(n), print1(n, ", "))) \\ Colin Barker, May 08 2014

Extensions

More terms from Colin Barker, May 08 2014
Example corrected by Colin Barker, May 09 2014
Showing 1-4 of 4 results.