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-5 of 5 results.

A243887 (p^2 - 3)/2 for odd primes p.

Original entry on oeis.org

3, 11, 23, 59, 83, 143, 179, 263, 419, 479, 683, 839, 923, 1103, 1403, 1739, 1859, 2243, 2519, 2663, 3119, 3443, 3959, 4703, 5099, 5303, 5723, 5939, 6383, 8063, 8579, 9383, 9659, 11099, 11399, 12323, 13283, 13943, 14963, 16019, 16379, 18239, 18623, 19403, 19799
Offset: 1

Views

Author

Vincenzo Librandi, Jun 15 2014

Keywords

Crossrefs

Programs

  • Magma
    [(p^2-3)/2: p in PrimesInInterval(3, 300)];
  • Mathematica
    Table[(Prime[n]^2 - 3)/2, {n, 2, 100}]

Formula

a(n) = A216244(n) - 1. [Robert Israel, Jun 15 2014]

A281680 a(0)=1; for n > 0, if 2n+1 is prime, then a(n)=1, otherwise a(n) = (2n+1)/(largest proper divisor of 2n+1).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 1, 3, 1, 1, 3, 1, 7, 3, 1, 5, 3, 1, 1, 3, 5, 1, 3, 1, 1, 3, 7, 1, 3, 1, 5, 3, 1, 7, 3, 5, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 3, 7, 11, 3, 5, 1, 3, 1, 7, 3, 1, 1, 3, 11, 5, 3, 1, 1, 3, 5, 1, 3, 7, 1, 3, 1, 13, 3, 1
Offset: 0

Views

Author

Enrique Navarrete, Jan 26 2017

Keywords

Comments

First occurrence of the k-th prime for k = 2, 3, 4, ... is at n = 4, 12, 24, 60, 84, 144, 180, 264, 420, 480, 684, 840, 924, 1104, etc.; This appears to be either A084921 or A216244. - Robert G. Wilson v, Feb 03 2017

Crossrefs

Programs

  • Maple
    f:= proc(n) if isprime(2*n+1) then 1 else min(numtheory:-factorset(2*n+1)) fi end proc:
    f(0):= 1:
    map(f, [$0..100]); # Robert Israel, Aug 03 2020
  • Mathematica
    f[n_] := If[ PrimeQ[2n +1], 1, FactorInteger[2n +1][[1, 1]]]; f[0] = 1; Array[f, 87, 0] (* Robert G. Wilson v, Jan 31 2017 *)
  • PARI
    a(n) = if (n==0, 1, if (isprime(o=2*n+1), 1, d=divisors(o); o/d[#d-1])); \\ Michel Marcus, Feb 02 2017

A306353 Number of composites among the first n composite numbers whose least prime factor p is that of the n-th composite number.

Original entry on oeis.org

1, 2, 3, 1, 4, 5, 6, 2, 7, 8, 9, 3, 10, 11, 1, 12, 4, 13, 14, 15, 5, 16, 2, 17, 18, 6, 19, 20, 21, 7, 22, 23, 1, 24, 8, 25, 26, 3, 27, 9, 28, 29, 30, 10, 31, 4, 32, 33, 11, 34, 35, 36, 12, 37, 2, 38, 39, 13, 40, 41, 5, 42, 14, 43, 44, 3, 45, 15, 46, 6, 47, 48, 16, 49, 50, 51, 17, 52, 53, 54, 18, 55, 56, 7
Offset: 1

Views

Author

Jamie Morken and Vincenzo Librandi, Feb 09 2019

Keywords

Comments

Composites with least prime factor p are on that row of A083140 which begins with p
Sequence with similar values: A122005.
Sequence written as a jagged array A with new row when a(n) > a(n+1):
1, 2, 3,
1, 4, 5, 6,
2, 7, 8, 9,
3, 10, 11,
1, 12,
4, 13, 14, 15,
5, 16,
2, 17, 18,
6, 19, 20, 21,
7, 22, 23,
1, 24,
8, 25, 26,
3, 27,
9, 28, 29, 30.
A153196 is the list B of the first values in successive rows with length 4.
B is given by the formula for A002808(x)=A256388(n+3), an(x)=A153196(n+2)
For example: A002808(26)=A256388(3+3), an(26)=A153196(3+2).
A243811 is the list of the second values in successive rows with length 4.
A047845 is the list of values in the second column and A104279 is the list of values in the third column of the jagged array starting on the second row.
Sequence written as an irregular triangle C with new row when a(n)=1:
1,2,3,
1,4,5,6,2,7,8,9,3,10,11,
1,12,4,13,14,15,5,16,2,17,18,6,19,20,21,7,22,23,
1,24,8,25,26,3,27,9,28,29,30,10,31,4,32,33,11,34,35,36,12,37,2,38,39,13,40,41,5,42,14,43,44,3,45,15,46,6,47,48,16,49,50,51,17,52,53,54,18,55,56,7,57,19,58,4,59.
A243887 is the last value in each row of C.
The second value D on the row n > 1 of the irregular triangle C is a(A053683(n)) or equivalently A084921(n). For example for row 3 of the irregular triangle:
D = a(A053683(3)) = a(16) = 12 or D = A084921(3) = 12. This is the number of composites < A066872(3) with the same least prime factor p as the A053683(3) = 16th composite, A066872(3) = 26.
The number of values in each row of the irregular triangle C begins: 3,11,18,57,39,98,61,141,265,104,351,268,...
The second row of the irregular triangle C is A117385(b) for 3 < b < 15.
The third row of the irregular triangle C has similar values as A117385 in different order.

Examples

			First composite 4, least prime factor is 2, first case for 2 so a(1)=1.
Next composite 6, least prime factor is 2, second case for 2 so a(2)=2.
Next composite 8, least prime factor is 2, third case for 2 so a(3)=3.
Next composite 9, least prime factor is 3, first case for 3 so a(4)=1.
Next composite 10, least prime factor is 2, fourth case for 2 so a(5)=4.
		

Crossrefs

Programs

  • Mathematica
    counts = {}
    values = {}
    For[i = 2, i < 130, i = i + 1,
    If[PrimeQ[i], ,
    x = PrimePi[FactorInteger[i][[1, 1]]];
      If[Length[counts] >= x,
       counts[[x]] = counts[[x]] + 1;
       AppendTo[values, counts[[x]]], AppendTo[counts, 1];
       AppendTo[values, 1]]]]
       (* Print[counts] *)
       Print[values]
  • PARI
    c(n) = for(k=0, primepi(n), isprime(n++)&&k--); n; \\ A002808
    a(n) = my(c=c(n), lpf = vecmin(factor(c)[,1]), nb=0); for(k=2, c, if (!isprime(k) && vecmin(factor(k)[,1])==lpf, nb++)); nb; \\ Michel Marcus, Feb 10 2019

Formula

a(n) is approximately equal to A002808(n)*(A038110(x)/A038111(x)), with A000040(x)=A020639(A002808(n)).
For example if n=325, a(325)~= A002808(325)*(A038110(2)/A038111(2)) with A000040(2)=A020639(A002808(325)).
This gives an estimate of 67.499... and the actual value of a(n)=67.

A370760 Table read by rows: row n is the unique primitive Pythagorean triple (a,b,c) such that a = prime(n).

Original entry on oeis.org

3, 4, 5, 5, 12, 13, 7, 24, 25, 11, 60, 61, 13, 84, 85, 17, 144, 145, 19, 180, 181, 23, 264, 265, 29, 420, 421, 31, 480, 481, 37, 684, 685, 41, 840, 841, 43, 924, 925, 47, 1104, 1105, 53, 1404, 1405, 59, 1740, 1741, 61, 1860, 1861, 67, 2244
Offset: 2

Views

Author

Keywords

Comments

See Corolario 5.2.3 of the reference.

Examples

			Table begins:
  n=2:   3,   4,   5;
  n=3:   5,  12,  13;
  n=4:   7,  24,  25;
  n=5:  11,  60,  61;
  n=6:  13,  84,  85;
  ...
		

References

  • Miguel Ángel Pérez García-Ortega, José Manuel Sánchez Muñoz and José Miguel Blanco Casado, El Libro de las Ternas Pitagóricas, Preprint 2024.

Crossrefs

Cf. A000040, A065091 (short leg), A216244 (long leg), A066885 (hypotenuse), A005097 (inradius).

Programs

  • Mathematica
    Apply[Join, Map[{#,(#^2-1)/2,(#^2+1)/2}&,Prime[Range[2,31]]]]

Formula

Row n = (a, b, c) = (p, ( p^2 - 1 ) / 2, ( p^2 + 1 ) / 2), where p = prime(n) = A000040(n).

A363367 a(n) is the least integer i >= 0 such that (i + 1) * (i + 2*n) / 2 = p^2, p prime number (A000040), or a(n) = -1 if no such i exists.

Original entry on oeis.org

-1, -1, 2, 4, 0, -1, 10, 12, -1, 0, 18, -1, 1, -1, -1, 28, 30, -1, -1, 36, -1, 40, 42, -1, 1, 0, -1, 52, -1, -1, 58, 60, -1, -1, 66, -1, 70, 72, -1, -1, 78, -1, 82, -1, -1, 88, -1, -1, -1, 0, -1, 100, 102, -1, 106, 108, -1, 112, -1, -1, 1, -1, -1, -1, 126, -1, 130
Offset: 0

Views

Author

Ctibor O. Zizka, Jul 05 2023

Keywords

Comments

The shortest arithmetic sequence with initial term n and difference 1 that sums to p^2, p prime number. 2*(n - 1) >= a(n) >= -1.

Examples

			n = 2: 2 + 3 + 4 = 9 = 3^2, a(2) = 2.
n = 3: 3 + 4 + 5 + 6 + 7 = 5^2, a(3) = 4.
n = 4: 4 = 2^2, a(4) = 0.
		

Crossrefs

Formula

a(p^2) = 0, p prime number.
Showing 1-5 of 5 results.