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 11-12 of 12 results.

A180590 Numbers k such that k! is the sum of two triangular numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 13, 15, 16, 17, 21, 24, 27, 28, 29, 32, 33, 34, 42, 49, 54, 59, 66, 68, 72, 79, 80, 81, 85, 86, 95, 96, 99, 102, 109, 118
Offset: 1

Views

Author

Robert G. Wilson v, Sep 10 2010

Keywords

Comments

Numbers k such that there are nonnegative numbers x and y such that x*(x+1)/2 + y*(y+1)/2 = k!. Equivalently, (2x+1)^2 + (2y+1)^2 = 8k! + 2. A necessary and sufficient condition for this is that all the prime factors of 4k!+1 that are congruent to 3 (mod 4) occur to even powers (cf. A001481).
Based on an email from R. K. Guy to the Sequence Fans Mailing List, Sep 10 2010.
See A152089 for further links.

Examples

			0! = 1! = T(0) + T(1);
2! = T(1) + T(1);
3! = T(0) + T(3) = T(2) + T(2);
4! = T(2) + T(6);
5! = T(0) + T(15) = T(5) + T(14);
7! = T(45) + T(89);
8! = T(89) + T(269);
9! = T(210) + T(825);
10! = T(665) + T(2610) = T(1770) + T(2030);
13! = T(71504) + T(85680);
15! = T(213384) + T(1603064) = T(299894) + T(1589154);
16! = T(3631929) + T(5353005);
17! = T(12851994) + T(23370945) = T(17925060) + T(19750115);
etc.
		

Crossrefs

Complement of A152089. A171099 gives the number of solutions.

Programs

  • Mathematica
    triQ[n_] := IntegerQ@ Sqrt[8 n + 1]; fQ[n_] := Block[{k = 1, lmt = Floor@Sqrt[2*n! ], nf = n!}, While[k < lmt && ! triQ[nf - k (k + 1)/2], k++ ]; r = (Sqrt[8*(nf - k (k + 1)/2) + 1] - 1)/2; Print[{k, r, n}]; If[IntegerQ@r, True, False]]; k = 1; lst = {}; While[k < 69, If[ fQ@ k, AppendTo[lst, k]]; k++ ]; lst
  • Python
    from math import factorial
    from itertools import count, islice
    from sympy import factorint
    def A180590_gen(): # generator of terms
        return filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(4*factorial(n)+1).items()),count(0))
    A180590_list = list(islice(A180590_gen(),15)) # Chai Wah Wu, Jun 27 2022

Extensions

Edited by N. J. A. Sloane, Sep 24 2010
69 eliminated (see A152089) by N. J. A. Sloane, Sep 24 2010
Extended by Georgi Guninski and D. S. McNeil, Sep 24 2010
a(35)-a(38) from Georgi Guninski, Oct 12 2010
a(39)-a(40) from Tyler Busby, Apr 24 2025

A062538 Primes of the form 4*k! + 1.

Original entry on oeis.org

5, 97, 20161, 161281, 1451521, 24908083201, 83691159552001, 1219553378446855442006016000001, 923374789356965521888370970732110324333114258287231764529152000000000001
Offset: 1

Views

Author

Jason Earls, Jul 10 2001

Keywords

Examples

			4*4! + 1 = 97, a prime.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=4*n!+1;If[PrimeQ[p],AppendTo[lst,p]],{n,0,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jan 28 2009 *)
    Select[(4Range[60]!+1),PrimeQ] (* Harvey P. Dale, May 08 2024 *)
  • PARI
    for(n=1,55, if(isprime(4*n!+1),print(4*n!+1)))

Formula

a(n) = A173322(A076680(n+1)). - Elmo R. Oliveira, Apr 17 2025
Previous Showing 11-12 of 12 results.