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.

User: Lamine Ngom

Lamine Ngom's wiki page.

Lamine Ngom has authored 29 sequences. Here are the ten most recent ones:

A364555 Numbers m such that no triangular number is m times a prime.

Original entry on oeis.org

17, 28, 32, 43, 46, 62, 67, 71, 72, 80, 88, 94, 101, 103, 104, 108, 109, 110, 118, 122, 124, 127, 130, 137, 144, 148, 149, 151, 152, 161, 162, 163, 170, 171, 172, 178, 181, 185, 188, 196, 197, 202, 206, 208, 212, 214, 218, 223, 226, 236, 238, 241, 242, 256, 257, 258
Offset: 1

Author

Lamine Ngom, Jul 28 2023

Keywords

Comments

Numbers m such that A364554(m) = 0.
Primes in sequence are A109998.
Conjecture: Numbers m such that there is no prime number in the union of all sets {(2*r -+ 1)/d; (r -+ 1)/(2*d)}, where d is some divisor of m and r = m/d.

Examples

			17 is a term since there isn't any triangular number T(k) such that T(k) = 17*p, with p prime.
28 is a term since there isn't any triangular number T(k) such that T(k) = 28*p, with p prime.
		

Crossrefs

A364554 a(n) = number of primes of the form T(k)/n, for some k, where T(k)=A000217(k) is a triangular number.

Original entry on oeis.org

1, 2, 3, 1, 3, 2, 2, 1, 3, 1, 2, 2, 1, 2, 4, 1, 0, 2, 1, 1, 4, 2, 2, 2, 1, 2, 2, 0, 1, 3, 1, 0, 4, 1, 3, 2, 2, 1, 3, 2, 1, 2, 0, 1, 2, 0, 1, 2, 1, 1, 4, 1, 1, 3, 1, 1, 4, 1, 1, 3, 1, 0, 2, 1, 2, 1, 0, 2, 2, 2, 0, 0, 1, 1, 4, 1, 1, 2, 1, 0, 2, 1, 2, 2, 2, 2, 4, 0, 1, 4
Offset: 1

Author

Lamine Ngom, Jul 28 2023

Keywords

Comments

Implementing a suggestion in the comment section of sequences A154296, ..., A154304, this sequence computes the number of primes of the form T(k)/n.
Equivalently, number of primes p such that 8*n*p+1 is a perfect square.
Let's consider, for all primes p, the set of linear recurrences {b(m)} defined as follows:
If p = 2, then {b(m)} = A074378 (numbers of the form x*(4*x -+ 1)); otherwise, b(m) = b(m-1) + 2*b(m-2) - 2*b(m-3) - b(m-4) + b(m-5) with initial terms b(0) = 0, b(1) = (p-1)/2, b(2) = (p+1)/2, b(3) = 2*p-1 and b(4) = 2*p+1. Numbers of the form x*(p*x -+ 1)/2.
Then a(n) = number of sequences {b(m)} in which n is a term.
This implies that:
i) for any n, the largest prime of the form T(k)/n is at most 2*n+1;
ii) if n is prime, then a(n) < 4. (3 and 5 are the only primes p such that a(p) = 3; primes p such that a(p) = 0 are A109998.)
Deeper in the examination of these results, we notice that the set of primes p of the form T(k)/n arises from the factorization of n. This set is exactly all primes p of the form (2*r -+ 1)/d or (r -+ 1)/(2*d), where d is some divisor of n and r is the ratio n/d. (Proof is welcome.)
Indices k of corresponding triangular numbers T(k) such that T(k) = n*p are then:
2*r if p = (2*r + 1)/d,
2*r - 1 if p = (2*r - 1)/d,
r if p = (r + 1)/(2*d),
r - 1 if p = (r - 1)/(2*d).
And pluging the value of p in the equivalent definition, the expression 8*n*p+1 yields respectively to following perfect squares: (4*r+1)^2, (4*r-1)^2, (2*r+1)^2 and (2*r-1)^2.

Examples

			a(15) = 4 since there are exactly 4 triangular numbers T(k) such that T(k) = 15*p, with p prime.
T(9)/15 = 45/15 = 3, T(14)/15 = 105/15 = 7, T(29)/15 = 435/15 = 29 and T(30)/15 = 465/15 = 31.
a(17) = 0 since there is no triangular number T(k) such that T(k) = 17*p, with p prime.
		

Crossrefs

Cf. A364555 (indices of 0's).

Formula

Conjecture: a(n) = number of primes in the union of sets {(2*r -+ 1)/d; (r -+ 1)/(2*d)}, with d divisor of n and r = n/d.

A358573 a(n) = smallest prime p such that q, r and s are all prime, where q = p + 2*(2*n + 1), r = (p - 2*n - 1)/2, and s = (q + 2*n + 1)/2.

Original entry on oeis.org

11, 13, 19, 17, 19, 229, 47, 29, 163, 29, 31, 37, 47, 53, 1231, 41, 43, 61, 83, 61, 439, 1217, 59, 73, 59, 61, 67, 89, 83, 541, 71, 73, 103, 593, 271, 349, 83, 89, 103, 461, 239, 97, 107, 97, 211, 149, 107, 229, 263, 181, 499, 317, 139, 1453, 131, 809, 127, 137, 163
Offset: 0

Author

Lamine Ngom, Nov 23 2022

Keywords

Comments

Equivalently, smallest prime of the form (p + q - 2*n - 1), where p is prime, q = p + 2*(2*n + 1) is prime, and (p + q + 2*n + 1) is also prime.
a(n) is the first term of the sequence of numbers m such that (m - 2*n - 2), (m - 1), (m + 4*n + 1) and (m + 6*n + 2) cannot be represented as x*y + x + y, with x >= y > 1 (A254636).
Such sequence contains only prime numbers which are the lesser of a pair of primes (p, q) such that the pair (r, s) also forms a pair of primes with the same difference, where q = p + 2*(2*n + 1), r = (p - 2*n - 1)/2, and s = (q + 2*n + 1)/2.

Examples

			229 is the lesser prime in the pair (229, 251) with difference 2*(2*5+1) = 22, and the couple (229-22/2)/2 = 109 and (251+22/2)/2 = 131 forms another prime pair with distance 22, and there is no prime lower than 229 with this property. Hence a(5) = 229.
		

Programs

  • Mathematica
    a[n_] := Module[{p=2, q, r, s}, While[!AllTrue[{(q = p + 2*(2*n + 1)), (r = (p - 2*n - 1)/2), (s = (q + 2*n + 1)/2)}, #>0 && PrimeQ[#] &], p = NextPrime[p]]; p]; Array[a, 60, 0] (* Amiram Eldar, Nov 23 2022 *)
  • PARI
    a(n) = my(p=2, q); while(!isprime(q = p + 2*(2*n + 1)) || !isprime((p - 2*n - 1)/2) || !isprime((q + 2*n + 1)/2), p=nextprime(p+1)); p; \\ Michel Marcus, Nov 23 2022

A358572 Smallest prime p in a sexy prime triple such that (p-3)/2 is also the smallest prime in a sexy prime triple (A023241).

Original entry on oeis.org

17, 97, 1117, 1217, 2897, 130337, 188857, 207997, 221197, 324517, 610817, 900577, 1090877, 1452317, 1719857, 1785097, 2902477, 3069917, 3246317, 4095097, 4536517, 4977097, 5153537, 5517637, 5745557, 6399677, 7168277, 7351957, 7588697, 7661077, 8651537, 8828497, 9153337
Offset: 1

Author

Lamine Ngom, Nov 23 2022

Keywords

Comments

Also numbers m such that m-4, m-1, m+5, m+8, m+11 and m+20 cannot be represented as x*y + x + y, with x >= y > 1 (A254636).
Subsequence of A358571.
Number of terms < 10^k: 0, 2, 2, 5, 5, 12, 34, 150, 655, ...
All terms p and (p-3)/2 have a final decimal digit of 7. This follows from considering possibilities modulo 10 and implies p + 18 and (p-3)/2 + 18 are divisible by 5 and hence composite. Both p and (p-3)/2 are therefore also terms of A046118. - Andrew Howroyd, Dec 31 2022

Examples

			97 is the smallest prime in the sexy prime triple (97, 103, 109), and the triple (47 = (97 - 3)/2, 47 + 6, 47 + 12) forms another sexy prime triple. Hence 97 is in the sequence.
		

Programs

  • Mathematica
    Select[Prime[Range[700000]], AllTrue[Join[# + {6,12}, (#-3)/2 + {0, 6, 12}], PrimeQ] &] (* Amiram Eldar, Nov 23 2022 *)
  • PARI
    istriple(p)={isprime(p) && isprime(p+6) && isprime(p+12)}
    isok(p)={istriple(p) && istriple((p-3)/2)}
    { forprime(p=1,10^7,if(isok(p), print1(p, ", "))) } \\ Andrew Howroyd, Dec 30 2022

A358571 Lesser p of a sexy prime pair such that (p-3)/2 is also the lesser prime of a sexy prime pair.

Original entry on oeis.org

13, 17, 37, 97, 457, 557, 1117, 1217, 1297, 2237, 2377, 2897, 4937, 7237, 9277, 10457, 18797, 21317, 23557, 24077, 27817, 29437, 30757, 34757, 38917, 39157, 48157, 48817, 50497, 55897, 60617, 62297, 64997, 72617, 81157, 82457, 90017, 94597, 107837, 108877, 111857
Offset: 1

Author

Lamine Ngom, Nov 23 2022

Keywords

Comments

Equivalently, sums of the form (sexy primes - 3) which are also the lesser prime of a sexy prime pair.
Also numbers m such that m-4, m-1, m+5 and m+8 cannot be represented as x*y + x + y, with x >= y > 1 (A254636).
More generally, any sequence of numbers m such that A254636(m - 2*k - 2), A254636(m - 1), A254636(m + 4*k + 1) and A254636(m + 6*k + 2) are all 0 will only provide prime numbers which are lesser of a pair of primes (p, q) such that the pair (r, s) forms also a pair of primes, where q = p + 2*(2*k + 1), r = (p - 2*k - 1)/2, and s = (q + 2*k + 1)/2. Obviously, s - r = q - p = 2*(2*k + 1).
For k = 0, we get sequence A256386 (starting from its 6th term).
For k = 1, this sequence.
For k = 2, sequence starts: 19, 31, 43, 79, 127, 163, 283, 547, 751, 919, ...
For k = 3, sequence starts: 17, 53, 113, 593, 773, 1553, 1733, 1973, 4013, ...
For k = 4, sequence starts: 19, 131, 431, 811, 991, 2111, 5431, 6011, 10771, ...
etc.
For n > 1, a(n) is congruent to 17 modulo 20.
Number of terms < 10^k: 0, 4, 6, 15, 38, 167, 934, 5091, 30229, ...

Examples

			97 is the lesser in the sexy prime pair (97, 103), and the pair of (97-3)/2 and (103+3)/2 yields another sexy prime pair: (47, 53). Hence 97 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[11000]], AllTrue[Join[{#+6}, (#-3)/2 + {0,6}], PrimeQ]&] (* Amiram Eldar, Nov 23 2022 *)
  • PARI
    isok1(p) = isprime(p) && isprime(p+6); \\ A023201
    isok(p) = isok1(p) && isok1((p-3)/2); \\ Michel Marcus, Nov 23 2022

A354381 Primitive elements in A354379, being those not divisible by any previous term.

Original entry on oeis.org

25, 65, 85, 89, 109, 145, 149, 169, 173, 185, 205, 221, 229, 233, 265, 289, 293, 305, 313, 349, 353, 365, 377, 409, 421, 433, 449, 461, 481, 485, 493, 505, 509, 533, 565, 601, 613, 629, 641, 653, 677, 685, 689, 697, 709, 757, 761, 769, 773, 785, 793, 797, 821, 829, 841, 857, 877, 881, 901, 905
Offset: 1

Author

Lamine Ngom, May 24 2022

Keywords

Examples

			The primitive Pythagorean triple (39, 80, 89) has all its terms in A009003, and 89 is not divisible by any previous term. Hence 89 is in sequence.
		

Crossrefs

Programs

  • Maple
    ishyp:= proc(n) local s; ormap(s -> s mod 4 = 1, numtheory:-factorset(n)) end proc:
    filter:= proc(n) local s;
      ormap(s -> ishyp(subs(s,x)) and ishyp(subs(s,y)), [isolve(x^2+y^2=n^2)])
    end proc:
    R:= []: count:= 0:
    for n from 1 while count < 100 do
      if ormap(t -> n mod t = 0, R) then next fi;
      if filter(n) then R:= [op(R),n]; count:= count+1; fi
    od:
    R; # Robert Israel, Jan 10 2023
  • Mathematica
    ishyp[n_] := AnyTrue[ FactorInteger[n][[All, 1]], Mod[#, 4] == 1 &] ;
    filter[n_] := AnyTrue[Solve[x^2 + y^2 == n^2, Integers], ishyp[x /. #] && ishyp[y /. #] &];
    R = {}; count = 0;
    For[n = 1, count < 100, n++, If[AllTrue[R, Mod[n, #] != 0&], If[filter[n], AppendTo[R, n]; count++]]];
    R (* Jean-François Alcover, May 11 2023, after Robert Israel *)

Extensions

Corrected by Robert Israel, Jan 10 2023

A354379 Hypotenuses of Pythagorean triangles whose legs are also hypotenuse numbers (A009003).

Original entry on oeis.org

25, 50, 65, 75, 85, 89, 100, 109, 125, 130, 145, 149, 150, 169, 170, 173, 175, 178, 185, 195, 200, 205, 218, 221, 225, 229, 233, 250, 255, 260, 265, 267, 275, 289, 290, 293, 298, 300, 305, 313, 325, 327, 338, 340, 346, 349, 350, 353, 356, 365, 370, 375, 377, 390, 400
Offset: 1

Author

Lamine Ngom, May 24 2022

Keywords

Comments

If m is in sequence, so is any multiple of m. Primitive elements (terms which are not divisible by any previous term) are A354381.

Examples

			25 is in sequence since each member of the Pythagorean triple (15, 20, 25) belongs to A009003.
The Pythagorean triple (39, 80, 89) has all its terms in A009003. Hence 89 is in sequence.
		

Crossrefs

Programs

  • Maple
    ishyp:= proc(n) local s; ormap(s -> s mod 4 = 1, numtheory:-factorset(n)) end proc:
    filter:= proc(n) local s;
      ormap(s -> ishyp(subs(s,x)) and ishyp(subs(s,y)), [isolve(x^2+y^2=n^2)])
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Jan 10 2023
  • Mathematica
    ishyp[n_] := AnyTrue[FactorInteger[n][[All, 1]], Mod[#, 4] == 1&];
    filter[n_] := AnyTrue[Solve[x^2 + y^2 == n^2, Integers], ishyp[x /. #] && ishyp[y /. #]&];
    Select[Range[400], filter] (* Jean-François Alcover, May 11 2023, after Robert Israel *)

A351354 Numbers k such that the k-th centered 40-gonal numbers (A195317) is a square.

Original entry on oeis.org

1, 3, 7, 45, 117, 799, 2091, 14329, 37513, 257115, 673135, 4613733, 12078909, 82790071, 216747219, 1485607537, 3889371025, 26658145587, 69791931223, 478361013021, 1252365390981, 8583840088783, 22472785106427, 154030760585065, 403257766524697, 2763969850442379
Offset: 1

Author

Lamine Ngom, Feb 08 2022

Keywords

Comments

Corresponding square roots are listed in A351353.
3 and 7 are the unique primes in this sequence, a(2*n+1) and a(2*n) always sharing common factors that are closely linked to Fibonacci (A000045) and Lucas (A000032) numbers (detailed in formula section).
In addition, the ratio a(2*n+1)/a(2*n) converges to 2.618033988 ... = golden ratio squared: A104457.

Examples

			45 is in the sequence because the 45th centered 40-gonal number is 39601, which is a square: 199^2 = A000032(11)^2.
799 is in the sequence because the 799th centered 40-gonal number is 12752041, which is a square: 3571^2 = A000032(17)^2.
		

Programs

  • Maple
    a[1] := 1: a[2] := 3: a[3] := 7: a[4] := 45: a[5] := 117:
    for n from 6 to 30 do a[n] := a[n - 1] + 18*a[n - 2] - 18*a[n - 3] - a[n - 4] + a[n - 5]: od:
    seq(a[n], n = 1 .. 30);
  • Mathematica
    LinearRecurrence[{1, 18, -18, -1, 1}, {1, 3, 7, 45, 117}, 30] (* Amiram Eldar, Feb 08 2022 *)

Formula

a(n) = A077259(n-1) + 1.
a(1)=1, a(2)=3, a(3)=7, a(4)=45, a(5)=117 and a(n) = a(n-1) + 18*a(n-2) - 18*a(n-3) - a(n-4) + a(n-5).
gcd(a(2*n+1), a(2*n)) = A000045(n)*(A000032(2*n) - 1)/2, if n is odd.
gcd(a(2*n+1), a(2*n)) = A000032(n)*(A000032(2*n) - 1)/2, if n is even.
A195317(a(n)) = A000032(A007310(n))^2 = A351353(n)^2.

A351353 Numbers k such that k^2 is a centered 40-gonal number.

Original entry on oeis.org

1, 11, 29, 199, 521, 3571, 9349, 64079, 167761, 1149851, 3010349, 20633239, 54018521, 370248451, 969323029, 6643838879, 17393796001, 119218851371, 312119004989, 2139295485799, 5600748293801, 38388099893011, 100501350283429, 688846502588399, 1803423556807921
Offset: 1

Author

Lamine Ngom, Feb 08 2022

Keywords

Comments

All terms are Lucas numbers (A000032).
Corresponding indices of centered 40-gonal numbers are listed in A351354.

Examples

			29 is in the sequence because 29^2 = 841 is a centered 40-gonal number (the 3rd centered 40-gonal number).
3571^2 = 12752041 is a centered 40-gonal number (the 799th centered 40-gonal number). Hence 3571 is in the sequence.
		

Crossrefs

Programs

  • Maple
    a[1] := 1: a[2] := 11: a[3] := 29: a[4] := 199: a[5] := 521:
    for n from 6 to 25 do a[n] := a[n - 1] + 18*a[n - 2] - 18*a[n - 3] - a[n - 4] + a[n - 5]: od:
    seq(a[n], n = 1 .. 25);
  • Mathematica
    LinearRecurrence[{0, 18, 0, -1}, {1, 11, 29, 199}, 25] (* Amiram Eldar, Feb 09 2022 *)

Formula

a(n) = A000032(A007310(n)).
G.f.: x*(1 + 11*x + 11*x^2 + x^3)/((1 + 4*x - x^2)*(1 - 4*x - x^2)). - Stefano Spezia, Feb 12 2022

A347533 Array A(n,k) where A(n,0) = n and A(n,k) = (k*n + 1)^2 - A(n,k-1), n > 0, read by ascending antidiagonals.

Original entry on oeis.org

1, 2, 3, 3, 7, 6, 4, 13, 18, 10, 5, 21, 36, 31, 15, 6, 31, 60, 64, 50, 21, 7, 43, 90, 109, 105, 71, 28, 8, 57, 126, 166, 180, 151, 98, 36, 9, 73, 168, 235, 275, 261, 210, 127, 45, 10, 91, 216, 316, 390, 401, 364, 274, 162, 55, 11, 111, 270, 409, 525, 571, 560, 477, 351, 199, 66
Offset: 1

Author

Lamine Ngom, Sep 05 2021

Keywords

Comments

A(n,k) is also the distance from A(n, k-1) to the earliest square greater than 3*A(n,k-1) - A(n,k-2).
In column k, every term is the arithmetic mean of its neighbors minus A000217(k).

Examples

			Array, A(n, k), begins:
  1  3   6  10  15   21   28   36   45 ... A000217;
  2  7  18  31  50   71   98  127  162 ... A195605;
  3 13  36  64 105  151  210  274  351 ...
  4 21  60 109 180  261  364  477  612 ...
  5 31  90 166 275  401  560  736  945 ...
  6 43 126 235 390  571  798 1051 1350 ...
  7 57 168 316 525  771 1078 1422 1827 ...
  8 73 216 409 680 1001 1400 1849 2376 ...
  9 91 270 514 855 1261 1764 2332 2997 ...
Antidiagonals, T(n, k), begin as:
   1;
   2,  3;
   3,  7,   6;
   4, 13,  18,  10;
   5, 21,  36,  31,  15;
   6, 31,  60,  64,  50,  21;
   7, 43,  90, 109, 105,  71,  28;
   8, 57, 126, 166, 180, 151,  98,  36;
   9, 73, 168, 235, 275, 261, 210, 127,  45;
  10, 91, 216, 316, 390, 401, 364, 274, 162,  55;
		

Crossrefs

Family of sequences (k*n + 1)^2: A016754 (k=2), A016778 (k=3), A016814 (k=4), A016862 (k=5), A016922 (k=6), A016994 (k=7), A017078 (k=8), A017174 (k=9), A017282 (k=10), A017402 (k=11), A017534 (k=12), A134934 (k=14).

Programs

  • Magma
    A347533:= func< n,k | (1/2)*((k*(n-k)+1)*((k+1)*(n-k)+1) +(-1)^k*(n-k- 1)) >;
    [A347533(n,k): k in [0..n-1], n in [1..13]]; // G. C. Greubel, Dec 25 2022
    
  • Mathematica
    A[n_, 0]:= n; A[n_, k_]:= (k*n+1)^2 -A[n,k-1]; Table[Function[n, A[n, k]][m-k+1], {m,0,10}, {k,0,m}]//Flatten (* Michael De Vlieger, Oct 27 2021 *)
  • SageMath
    def A347533(n,k): return (1/2)*((k*(n-k)+1)*((k+1)*(n-k)+1) +(-1)^k*(n-k- 1))
    flatten([[A347533(n,k) for k in range(n)] for n in range(1,14)]) # G. C. Greubel, Dec 25 2022

Formula

A(n,k) = A000217(k)*n^2 + k*n + 1, for k odd.
A(n,k) = A000217(k)*n^2 + (k+1)*n = (k+1)*x*(k*n/2 + 1), for k even.
A(n,k) = (A(n,k-1) + A(n,k+1) + k*(k+1))/2, for any k.
A(n, 0) = A000027(n).
A(n, 1) = A002061(n+1).
A(n, 2) = A028896(n).
A(n, 3) = A085473(n).
From G. C. Greubel, Dec 25 2022: (Start)
A(n, k) = (1/2)*( (k*n+1)*(k*n+n+1) + (-1)^k*(n-1) ).
T(n, k) = (1/2)*( (k*(n-k)+1)*((k+1)*(n-k)+1) + (-1)^k*(n-k-1) ).
Sum_{k=0..n-1} T(n, k) = (1/120)*(2*n^5 + 5*n^4 + 20*n^3 + 25*n^2 + 98*n - 15*(1-(-1)^n)). (End)