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.

A257974 Prime numbers that are not the sum of one or more consecutive triangular numbers.

Original entry on oeis.org

2, 5, 7, 11, 13, 17, 23, 29, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 89, 97, 101, 103, 107, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 211, 223, 227, 229, 233, 239, 241, 257, 263, 269, 271, 277, 281, 283
Offset: 1

Views

Author

Keywords

Comments

Subsequence of primes of A050941. - Michel Marcus, Dec 14 2015
Prime numbers that are not the difference of two tetrahedral numbers (A000292). - Franklin T. Adams-Watters, Dec 16 2015

Examples

			From _Michael De Vlieger_, Nov 06 2015: (Start)
3 is a triangular number thus is not a term.
The triangular numbers <= 7 are {1, 3, 6}. None of these are 7. 7 is not found among the sums of adjacent pairs of terms, i.e., {{1, 3}, {3, 6}} = {4, 9}. The sum of all numbers {1, 3, 6} = 10. Thus 7 is a term.
The triangular numbers <= 19 are {1, 3, 6, 10, 15}. 19 is not a triangular number. 19 is not found among sums of pairs of adjacent terms {4, 9, 16, 25} nor among those of quartets of adjacent terms {20, 34}, but is found among sums of triples of adjacent terms {10, 19, 31}. Thus 19 is not a term. (End)
		

Crossrefs

Programs

  • Maple
    isA257974 := proc(n)
        if isprime(n) then
            return not isA034706(n) ;
        else
            false ;
        end if;
    end proc:
    for n from 0 to 400 do
        if isA257974(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Dec 14 2015
  • Mathematica
    t = Array[Binomial[# + 1, 2] &, {10^4}]; fQ[n_] := Block[{s}, s = TakeWhile[t, # <= n &]; AnyTrue[Flatten[Total /@ Partition[s, #, 1] & /@ Range[Length@ s - 1]], # == n &]]; Select[Prime@ Range@ 120, ! fQ@ # &] (* Michael De Vlieger, Nov 06 2015, Version 10 *)

Extensions

More terms from Michael De Vlieger, Nov 06 2015