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

A166743 a(n) = (2^p - p^2 - 1)/6 where p = prime(n).

Original entry on oeis.org

1, 13, 321, 1337, 21797, 87321, 1398013, 89478345, 357913781, 22906492017, 366503875645, 1466015503393, 23456248058853, 1501199875789697, 96076792050570001, 384307168202281705, 24595658764946068073
Offset: 3

Views

Author

Tanin (Mirza Sabbir Hossain Beg) (mirzasabbirhossainbeg(AT)yahoo.com), Oct 21 2009

Keywords

Crossrefs

Programs

  • Maple
    A166743 := proc(n) p := ithprime(n) ; (2^p-p^2-1)/6 ; end: seq(A166743(n),n=3..20) ; # R. J. Mathar, Oct 25 2009
  • Mathematica
    Table[(2^p-p^2-1)/6,{p,Prime[Range[3,20]]}] (* Harvey P. Dale, May 16 2020 *)

Formula

a(n) = (A034785(n) - A066872(n))/6. - R. J. Mathar, Oct 25 2009

Extensions

Missing exponentiation signs inserted in the definition by R. J. Mathar, Oct 25 2009
Corrected by D. S. McNeil, Aug 20 2010

A167276 Primes p such that p^2=x^2+y^2-1 with x and y also prime.

Original entry on oeis.org

7, 13, 17, 23, 31, 37, 41, 43, 47, 53, 67, 73, 83, 89, 103, 107, 109, 137, 149, 151, 157, 163, 173, 191, 193, 227, 229, 233, 241, 263, 269, 293, 307, 311, 313, 317, 331, 337, 353, 359, 383, 389, 397, 401, 421, 431, 439, 443, 457, 463, 467, 487, 499, 523, 557, 577, 593, 599, 613, 619, 643, 683, 701, 727, 733, 757, 773, 829, 839, 853, 857, 863, 887, 947, 967, 977, 983, 997
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 01 2009

Keywords

Comments

Appears to be infinite.
Since (5*x+13)^2 + 1 = (3*x+7)^2 + (4*x+11)^2, it appears that there are infinitely many members of this sequence of the form 5*x+13 where x is an even number, that is the form of A030431(n). See the solution 78 at page 49 in the given reference (250 Problems in Elementary Number Theory) for the related conjecture. - Altug Alkan, Mar 30 2016

Examples

			a(1)=7 (x=5, y=5); a(2)=13 (x=7, y=11); a(3)=17 (x=11, y=17); a(4)=23 (x=13, y=19); a(5)=31 (x=11, y=31);...; a(21)=463 (x=461, y=43)
		

References

  • W. Sierpiński, 250 Problems in Elementary Number Theory. New York: American Elsevier, Warsaw, 1970, Problem 78 page 7.

Crossrefs

Cf. A000040.

Programs

  • Maple
    isA045636 := proc(n) local p,q ; p := 2 ; while p^2+4 <= n do q := p ; while p^2+q^2 <= n do if q^2+p^2 = n then return true; end if ; q := nextprime(q) ; end do ; p := nextprime(p) ; end do ; return false ; end proc: A066872 := proc(n) ithprime(n)^2+1 ; end: for n from 1 to 200 do if isA045636(A066872(n)) then printf("%d,",ithprime(n)) ; end if ; end do ; # R. J. Mathar, Nov 09 2009
  • Mathematica
    Select[Prime@ Range@ 168, Resolve[Exists[{x, y}, Reduce[#^2 == x^2 + y^2 - 1, {x, y}, Primes]]] &] (* Michael De Vlieger, Mar 30 2016 *)

Formula

{ A000040(i): A066872(i) in A045636}. [R. J. Mathar, Nov 09 2009]

Extensions

Edited and extended by Daniel Platt, Nov 02 2009

A246447 The odd primes squared plus 1 and the composites squared minus 1.

Original entry on oeis.org

10, 15, 26, 35, 50, 63, 80, 99, 122, 143, 170, 195, 224, 255, 290, 323, 362, 399, 440, 483, 530, 575, 624, 675, 728, 783, 842, 899, 962, 1023, 1088, 1155, 1224, 1295, 1370, 1443, 1520, 1599, 1682, 1763, 1850, 1935, 2024, 2115, 2210, 2303, 2400, 2499, 2600
Offset: 1

Views

Author

Leo Depuydt, Aug 26 2014

Keywords

Comments

The odd primes squared plus 1 and the nonprimes squared minus 1 are the numerators or denominators of an infinite product converging to 1 whose denominators or numerators, conversely, are the squares of said numbers, that is, (p^2+1/p^2)*(q^2-1)/q^2)..., where p is an odd prime and q is a nonprime.
Union of A066872 and (A062312 - 1) with 0 and 5 removed. - Robert Israel, Aug 26 2014

Crossrefs

Programs

  • PARI
    lista(nn) = {for (n=3, nn, if (isprime(n), print1(n^2+1, ", "), print1(n^2-1, ", ")););} \\ Michel Marcus, Aug 26 2014
    
  • Python
    for n in range(3,10**3):
      if isprime(n):
        print(n**2+1,end=', ')
      else:
        print(n**2-1,end=', ') # Derek Orr, Sep 19 2014

Extensions

More terms from Michel Marcus, Aug 26 2014

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.

A345261 a(n) = Sum_{d|n} d * rad(d).

Original entry on oeis.org

1, 5, 10, 13, 26, 50, 50, 29, 37, 130, 122, 130, 170, 250, 260, 61, 290, 185, 362, 338, 500, 610, 530, 290, 151, 850, 118, 650, 842, 1300, 962, 125, 1220, 1450, 1300, 481, 1370, 1810, 1700, 754, 1682, 2500, 1850, 1586, 962, 2650, 2210, 610, 393, 755, 2900, 2210, 2810, 590
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 12 2021

Keywords

Comments

If p is prime, a(p) = Sum_{p|d} d * rad(d) = 1*1 + p*p = p^2 + 1.
Inverse Möbius transform of n * rad(n). - Wesley Ivan Hurt, Mar 31 2025

Examples

			a(10) = Sum_{d|10} d * rad(d) = 1*1 + 2*2 + 5*5 + 10*10 = 1 + 4 + 25 + 100 = 130.
		

Crossrefs

Cf. A007947 (rad), A066872, A345263.

Programs

  • Mathematica
    Table[Sum[i (1 - Ceiling[n/i] + Floor[n/i]) Product[k^((PrimePi[k] - PrimePi[k - 1]) (1 - Ceiling[i/k] + Floor[i/k])), {k, i}], {i, n}], {n, 80}]
  • PARI
    rad(n) = factorback(factorint(n)[, 1]);
    a(n) = sumdiv(n, d, d*rad(d)); \\ Michel Marcus, Jun 12 2021

Formula

a(prime(n)) = A066872(n). - Michel Marcus, Jun 12 2021

A352973 Prime numbers p such that iterating the map m -> m^2 + 1 on p generates a number ending with p in binary format.

Original entry on oeis.org

2, 5, 37, 421, 8101, 11771813, 10593030863298469, 17520588382079786917, 644709886888204541861, 126810635974586364597324276501890165253751178116964261, 281339171965861859345972453867311708147087370351598335047820025433137061
Offset: 1

Views

Author

Ya-Ping Lu, Apr 13 2022

Keywords

Examples

			37 is a term because iterating the map on 37, which is '100101' in binary format, gives: 37 -> 1370 -> 1876901, which in binary format is '111001010001110100101' ending with '100101'.
		

Crossrefs

Programs

  • Python
    from sympy import isprime; R = []
    for i in range(0, 1000):
        t = 2**i; L = []
        while t not in L: L.append(t); t = (t*t + 1) % 2**(i+1)
        {R.append(j) for j in {L[-1], L[-2]} if j not in R and isprime(j)}
    R.sort(); print(*R, sep = ', ')

A379723 Possible values of the sum of squares of divisors function (A001157).

Original entry on oeis.org

1, 5, 10, 21, 26, 50, 85, 91, 122, 130, 170, 210, 250, 260, 290, 341, 362, 455, 500, 530, 546, 610, 651, 820, 842, 850, 962, 1050, 1220, 1300, 1365, 1370, 1450, 1682, 1700, 1810, 1850, 1911, 2210, 2366, 2451, 2500, 2562, 2650, 2810, 2900, 3172, 3255, 3410, 3482
Offset: 1

Views

Author

Amiram Eldar, Jan 03 2025

Keywords

Comments

The distinct values of the sigma_2(n) function, in ascending order.
The asymptotic density of this sequence is 0 (Niven, 1951).
5460 = sigma_2(60) and 5461 = sigma_2(64) are two consecutive integers in this sequence. Are there any other such pairs? There are none below 10^10.

Crossrefs

A066872 is a subsequence.
Subsequence of A211347.

Programs

  • Mathematica
    seq[lim_] := Select[Union[DivisorSigma[2, Range[lim]]], # <= lim &]; seq[3500]
  • PARI
    is(n) = invsigmaNum(n, 2) > 0; \\ Amiram Eldar, Jan 03 2025, using Max Alekseyev's invphi.gp

A121208 Cyclotomic polynomials evaluated at prime number abscissae.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, 26, 28, 30, 31, 32, 36, 38, 40, 42, 43, 44, 46, 48, 50, 52, 54, 57, 58, 60, 61, 62, 66, 68, 70, 72, 73, 74, 78, 80, 82, 84, 88, 90, 96, 98, 100, 102, 104, 106, 108, 110, 111, 112, 114, 121, 122, 126, 127
Offset: 1

Views

Author

R. J. Mathar, Aug 20 2006

Keywords

Comments

Contains as subsets: all A006093 which are Phi_1(p), all A008864 which are Phi_2(p), all A060800 which are Phi_3(p), all A066872 which are Phi_4(p) and all A119959 which are Phi_6(p).

Examples

			Contains 50, which is the fourth cyclotomic polynomial evaluated at the prime 7, 50=Phi_4(7).
		

Crossrefs

Formula

a(n) = Phi_j(p), p in A000040, j=1,2,3,4...

A241855 Array t(n,k) of sum of successive even powers of primes, where t(n,k) = sum_(j=0..k-1) prime(n)^(2j), with n>=1 and k>=0, read by ascending antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, 5, 0, 1, 10, 21, 0, 1, 26, 91, 85, 0, 1, 50, 651, 820, 341, 0, 1, 122, 2451, 16276, 7381, 1365, 0, 1, 170, 14763, 120100, 406901, 66430, 5461, 0, 1, 290, 28731, 1786324, 5884901, 10172526, 597871, 21845, 0, 1, 362, 83811, 4855540, 216145205, 288360150, 254313151, 5380840, 87381
Offset: 1

Views

Author

Jean-François Alcover, Apr 30 2014

Keywords

Comments

Conjecture: any term, except 0 and 1, is never a square.
Row n=1 is A002450,
row n=2 is A002452,
row n=3 is A218728,
row n=4 is A218753,
rows n>=5 are not in the OEIS,
column k=2 is A066872,
columns k>=3 are not in the OEIS.

Examples

			Array begins:
0,  1,   5,    21,      85,       341,        1365, ...
0,  1,  10,    91,     820,      7381,       66430, ...
0,  1,  26,   651,   16276,    406901,    10172526, ...
0,  1,  50,  2451,  120100,   5884901,   288360150, ...
0,  1, 122, 14763, 1786324, 216145205, 26153569806, ...
etc.
		

Crossrefs

Programs

  • Mathematica
    t[n_, k_] := ((Prime[n]^2)^k-1)/(Prime[n]^2-1); Table[t[n-k+1, k], {n, 0, 10}, {k, 0, n}] // Flatten

Formula

t(n,k) = ((prime(n)^2)^k-1)/(prime(n)^2-1).
Previous Showing 11-19 of 19 results.