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 21-30 of 40 results. Next

A309332 Number of ways the n-th triangular number T(n) = A000217(n) can be written as the sum of two positive triangular numbers.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 2, 0, 3, 0, 0, 1, 1, 3, 0, 0, 1, 0, 1, 0, 0, 3, 1, 1, 0, 1, 3, 0, 1, 1, 1, 2, 0, 1, 2, 0, 1, 1, 2, 1, 1, 1, 1, 2, 1, 0, 3, 1, 1, 1, 0, 3, 1, 1, 0, 0, 2, 0, 1, 1, 1, 1, 1, 5, 0, 1, 1, 0, 1, 0, 0, 3, 0, 3, 1, 0, 3, 1, 3, 1, 3, 3, 0, 1, 0, 0, 3, 0, 2, 0, 1
Offset: 1

Views

Author

Alois P. Heinz, Aug 01 2019

Keywords

Comments

The order doesn't matter. 21 = 6+15 = 15+6 are not counted as distinct solutions. - N. J. A. Sloane, Feb 22 2020

Examples

			a(3) = 1: 2*3/2 + 2*3/2 = 3*4/2.
a(21) = 2: 6*7/2 + 20*21/2 = 12*13/2 + 17*18/2 = 21*22/2.
a(23) = 3: 9*10/2 + 21*22/2 = 11*12/2 + 20*21/2 = 14*15/2 + 18*19/2 = 23*24/2.
		

Crossrefs

Cf. A000217, A001652, A012132, A027861, A046080 (the same for squares), A053141, A062301 (the same for primes), A108769, A309507.

Programs

  • Maple
    a:= proc(n) local h, j, r, w; h, r:= n*(n+1), 0;
          for j from n-1 by -1 do w:= j*(j+1);
            if 2*w
    				
  • Mathematica
    a[n_] := Module[{h = n(n+1), j, r = 0, w}, For[j = n-1, True, j--, w = j(j+1); If[2w < h, Break[]]; If[ IntegerQ[Sqrt[4(h-w)+1]], r++]]; r];
    Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Nov 16 2022, after Alois P. Heinz *)

Formula

a(n) > 0 <=> n in { A012132 }.
a(n) = 0 <=> n in { A027861 }.
a(n) = 1 <=> n in { A108769 }.

A378898 a(n) is the least k > 0 such that (n+k)^2 + n^2 is prime.

Original entry on oeis.org

1, 1, 5, 1, 1, 5, 1, 5, 1, 3, 3, 1, 7, 1, 7, 3, 1, 5, 1, 3, 5, 1, 7, 1, 1, 5, 5, 5, 1, 1, 13, 1, 7, 1, 1, 13, 3, 7, 1, 3, 3, 1, 5, 5, 7, 3, 1, 5, 25, 1, 5, 5, 5, 5, 3, 5, 11, 5, 5, 1, 3, 3, 17, 7, 1, 5, 13, 27, 1, 1, 13, 1, 27, 5, 19, 9, 3, 5, 1, 9, 19, 1, 5, 1, 1, 9, 1, 15, 7, 1, 3, 3, 5, 5, 7
Offset: 1

Views

Author

Robert Israel, Dec 11 2024

Keywords

Examples

			a(3) = 5 because (3+5)^2 + 3^2 = 73 is prime, and no smaller number works.
		

Crossrefs

Cf. A027861 (a(n) = 1), A089489, A378945, A378946.

Programs

  • Maple
    f:= proc(n) local k;
      for k from n+1 by 2 do
        if igcd(k,n) = 1 and isprime(k^2 + n^2) then return k-n fi
      od
    end proc;
    map(f, [$1..100]);
  • PARI
    a(n) = my(k=1); while (!isprime((n+k)^2 + n^2), k++); k; \\ Michel Marcus, Dec 11 2024

Formula

a(n) = A089489(n) - n.

A089619 a(n) = greatest prime factor of n^2 + (n+1)^2 for n >= 1.

Original entry on oeis.org

5, 13, 5, 41, 61, 17, 113, 29, 181, 17, 53, 313, 73, 421, 37, 109, 613, 137, 761, 29, 37, 1013, 17, 1201, 1301, 281, 89, 13, 1741, 1861, 397, 2113, 449, 2381, 2521, 41, 97, 593, 3121, 193, 53, 3613, 757, 233, 101, 173, 4513, 941, 29, 5101, 1061, 149, 229, 457, 101
Offset: 1

Views

Author

Cino Hilliard, Dec 31 2003

Keywords

Examples

			2*7^2 - 2*7 + 1 = 85 = 5*17, so a(7) = 17.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := FactorInteger[n^2 + (n+1)^2][[-1, 1]]; Array[a, 60] (* Amiram Eldar, Oct 29 2024 *)
  • PARI
    xnpym1n(m) = { for(n=1,m, y = n^2+(n+1)^2; f = factor(y); l = length(component(f,1)); v = component(component(f,1),l); print1(v","); ) }

Formula

a(n) = A006530(A001844(n)).

Extensions

Edited by Ray Chandler, Jan 03 2004
Offset corrected by Georg Fischer, May 27 2024

A108769 Numbers m such that m^2 + (m+1)^2 is a semiprime.

Original entry on oeis.org

3, 6, 8, 10, 11, 13, 15, 16, 18, 20, 26, 27, 31, 33, 37, 38, 40, 43, 44, 45, 48, 51, 52, 54, 55, 56, 57, 59, 62, 63, 64, 67, 68, 73, 74, 75, 76, 77, 80, 81, 83, 89, 92, 94, 98, 105, 107, 111, 112, 113, 114, 117, 120, 123, 124, 129, 131, 133, 134, 138, 140, 141, 142, 143
Offset: 1

Views

Author

Jason Earls, Jun 25 2005

Keywords

Comments

Numbers m such that A099776(m) is a semiprime. - Michel Marcus, Nov 17 2022

Crossrefs

Programs

  • Maple
    a:= proc(n) local k; for k from 1+`if`(n=1, 0, a(n-1))
          while (t-> isprime(t) or numtheory[bigomega](t)
          >2)(2*k*(k+1)+1) do od: k
        end:
    seq(a(n), n=1..70);  # Alois P. Heinz, Aug 01 2019
  • Mathematica
    Select[Range[1000], PrimeOmega[#^2 + (#+1)^2] == 2&] (* Jean-François Alcover, Nov 17 2022 *)
  • PARI
    isok(m) = bigomega(m^2 + (m+1)^2) == 2; \\ Michel Marcus, Nov 17 2022

A158526 n and (1 + 2*n + 2*n^2) are primes.

Original entry on oeis.org

2, 5, 7, 17, 19, 29, 47, 79, 97, 109, 137, 139, 149, 157, 167, 199, 229, 347, 349, 389, 409, 467, 479, 547, 577, 599, 709, 719, 757, 857, 929, 937, 967, 1039, 1069, 1087, 1187, 1229, 1259, 1399, 1409, 1447, 1559, 1579, 1597, 1607, 1657, 1697, 1699, 1709
Offset: 1

Views

Author

Zak Seidov, Mar 20 2009

Keywords

Comments

Numbers n such that A048395(n) is semiprime, or A048395(n)/n is prime.
Or, primes in A027861. Also, (1+2*n+2*n^2) are in A027862. - Zak Seidov, Sep 19 2015

Examples

			A048395(2)=26=2*13, A048395(5)=305=5*61, A048395(7)=791=7*113.
		

Crossrefs

Cf. A048395 (sum of consecutive nonsquares), A001358 (semiprimes).

Programs

A218213 Number of n-digit primes representable as sums of consecutive squares.

Original entry on oeis.org

1, 4, 13, 30, 69, 187, 519, 1401, 3889, 10861, 31640, 90735
Offset: 1

Views

Author

Martin Renner, Oct 23 2012

Keywords

Comments

There are no common representations of two, three or six squares for n < 13, so
a(n) = A218207(n) + A218209(n) + A218211(n); n < 13.

Crossrefs

Programs

  • Mathematica
    nn = 8; nMax = 10^nn; t = Table[0, {nn}]; Do[k = n; s = 0; While[s = s + k^2; s <= nMax, If[PrimeQ[s], t[[Ceiling[Log[10, s]]]]++];  k++], {n, Sqrt[nMax]}]; t (* T. D. Noe, Oct 23 2012 *)

Formula

a(n) = A218214(n) - A218213(n-1).

A242927 Numbers m such that k^m + (k+1)^m + ... + (k+m-1)^m is prime for some k.

Original entry on oeis.org

1, 2, 6, 42, 1806
Offset: 1

Views

Author

Derek Orr, May 26 2014

Keywords

Comments

a(5) > 500. For m values < 500 not listed above, k has been checked for k <= 5000.
For the first four terms, the least k that makes k^m + (k+1)^m + ... + (k+m-1)^m prime is {2, 1, 4, 99} respectively.
For a(5) = 1806, k = 3081 yields a strong PRP with 6663 digits. - Don Reble, Mar 23 2018
The known terms a(1..5) coincide with the finite sequence A014117. - M. F. Hasler, May 20 2019

Examples

			k^1 = k is prime for k = 2 or any other prime (cf. A000040), so 1 is a term of this sequence.
k^2 + (k+1)^2 is prime for some k (e.g., k = 2 yields 13, see A027861 for the full list), so 2 is a term of this sequence.
k^3 + (k+1)^3 + (k+2)^3 = 3*(k+1)*(k^2+2*k+3) is never prime, therefore 3 is not a term of this sequence.
Similarly, the corresponding expression for m = 4 and m = 5 is a multiple of 2 and 5, respectively, and for all m = 7, ..., 41, the expression also shares a factor with m (and thus is a multiple of m whenever m is prime).
Index m = 110 is the smallest m > 42 for which the expression is not algebraically composite (the polynomial in k has content 1 and is irreducible over Q), but it does factor as (k(k+1)(k+2)(k+3)(k+4))^10 over Z_5, so is always a multiple of 5. Index m = 210 is the next one which is a similar case.
Index m = 231 is much like m = 110, but with a factor 7 instead of 5.
Index m = 330 again yields an irreducible polynomial with content 1, but as before one can show that it is always divisible by 5. And so on.
		

Crossrefs

Programs

  • PARI
    k(n)=for(k=1,5000,if(ispseudoprime(sum(i=0,n-1,(k+i)^n)),return(k)))
    for(n=1,500,if(k(n),print(n)))  \\ Edited by M. F. Hasler, Mar 23 2018

Extensions

a(5) from Don Reble, Mar 23 2018
Example corrected and extended by M. F. Hasler, Apr 05 2018

A108809 Numbers n such that both n+(n-1)^2 and n+(n+1)^2 are primes.

Original entry on oeis.org

2, 3, 4, 7, 9, 15, 18, 25, 34, 55, 58, 63, 67, 100, 102, 139, 144, 148, 154, 162, 163, 168, 190, 195, 219, 232, 247, 267, 280, 289, 330, 349, 379, 384, 417, 427, 448, 454, 477, 568, 580, 643, 645, 669, 672, 727, 762, 793, 802, 813, 837, 847, 900, 975, 988, 993
Offset: 1

Views

Author

Walter Kehowski, Jul 04 2005

Keywords

Examples

			34 is in the sequence because 34 + 33^2 = 1123 and 34 + 35^2 = 1259 are both prime.
		

Crossrefs

Cf. A027861.
Intersection of A055494 and A094210. - Michel Marcus, Feb 08 2017

Programs

  • Maple
    L:=[]; for k from 1 to 1000 do if isprime(k+(k-1)^2) and isprime(k+(k+1)^2) then L:=[op(L),k] fi od;
  • Mathematica
    Select[Range@1000, PrimeQ[#^2 - # + 1] && PrimeQ[#^2 + 3 # + 1] &] (* Ivan Neretin, Feb 08 2017 *)
  • PARI
    isok(n) = isprime(n+(n-1)^2) && isprime(n+(n+1)^2); \\ Michel Marcus, Feb 08 2017

A134002 Positive integers n such that n(n+5)=a(a+5)+b(b+5) is solvable in positive integers.

Original entry on oeis.org

5, 10, 11, 13, 15, 16, 20, 23, 24, 25, 30, 31, 33, 35, 36, 37, 38, 40, 42, 45, 46, 47, 49, 50, 55, 57, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 73, 75, 76, 80, 81, 84, 85, 86, 88, 89, 90, 92, 95, 98, 99, 100, 101, 102, 105, 108, 110, 111, 112, 114, 115, 118, 120, 124, 125
Offset: 1

Views

Author

John W. Layman, Oct 01 2007

Keywords

Comments

Conjecture. If n a positive integer not a term of this sequence, then n^2+(n+5)^2 is prime. (This has been verified up to n=500.) Examples. For n=1,2,3,4,6,7, n^2+(n+5)^2 is 37, 53,73, 97, 157 and 193, each of which is prime. See A134003 for the complement of this sequence.

Examples

			5(5+5)=50=14+36=2(2+5)+4(4+5), so 5 is a term of the sequence.
		

Crossrefs

A134003 Positive integers n for which n^2+(n+5)^2 is prime.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 12, 14, 17, 18, 19, 21, 22, 26, 27, 28, 29, 32, 34, 39, 41, 43, 44, 48, 51, 52, 53, 54, 56, 58, 59, 66, 72, 74, 77, 78, 79, 82, 83, 87, 91, 93, 94, 96, 97, 103, 104, 106, 107, 109, 113, 116, 117, 119, 121, 122, 123, 126, 134, 136, 137, 144, 151, 157
Offset: 1

Views

Author

John W. Layman, Oct 01 2007

Keywords

Comments

Conjecture. If n is in this sequence then n(n+5)=a(a+5)+b(b+5) is not solvable in integers. (This has been verified up to n=500.) See A134002 for the complement of this sequence (in the positive integers).

Crossrefs

Programs

Previous Showing 21-30 of 40 results. Next