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

A210479 Primes p with p-1 and p+1 both practical: "Sandwich of the first kind".

Original entry on oeis.org

3, 5, 7, 17, 19, 29, 31, 41, 79, 89, 127, 197, 199, 271, 307, 379, 449, 461, 463, 521, 701, 727, 811, 859, 881, 919, 929, 967, 991, 1217, 1231, 1289, 1301, 1409, 1471, 1481, 1483, 1567, 1721, 1889, 1951, 1999, 2129, 2393, 2441, 2549, 2551, 2729, 2753, 2861, 2969, 3041, 3079, 3319, 3329, 3331, 3499, 3739, 3761, 4049
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 23 2013

Keywords

Comments

When p is a prime with p-1 and p+1 both practical, {p-1, p, p+1} is a sandwich of the first kind introduced by Zhi-Wei Sun. He conjectured that there are infinitely many such sandwiches. See also A210480 for a strong conjecture involving terms in the current sequence.
No term can be congruent to 1 or -1 modulo 12. In fact, if p>3 and 12|p-1, then neither 3 nor 4 divides p+1, hence p+1 is not practical since 4 is not a sum of some distinct divisors of p+1. Similarly, if 12|p+1 then p-1 is not practical.
Conjecture: The sequence a(n)^(1/n) (n=9,10,...) is strictly decreasing to the limit 1. Also, if {b(n)-1,b(n),b(n)+1} is the n-th sandwich of the second kind, then the sequence b(n)^(1/n) (n=1,2,3,...) is strictly decreasing to the limit 1.
This conjecture is similar to Firoozbakht's conjecture for primes.

Examples

			a(1)=3 since 2 and 4 are practical.
a(2)=5 since 4 and 6 are practical.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
    n=0
    Do[If[pr[Prime[k]-1]==True&&pr[Prime[k]+1]==True,n=n+1;Print[n," ",Prime[k]]],{k,1,100}]
  • PARI
    is_A210479(p)={is_A005153(p-1) && is_A005153(p+1) && isprime(p)} \\ M. F. Hasler, Jan 23 2013
    
  • PARI
    A210479(n,print_all=0)={forprime(p=3,, is_A005153(p-1) & is_A005153(p+1) & !(print_all & print1(p",")) & !n-- & return(p))} \\ M. F. Hasler, Jan 23 2013

A287681 Twin practical numbers: numbers k such that both k and k+2 are practical numbers.

Original entry on oeis.org

2, 4, 6, 16, 18, 28, 30, 40, 54, 64, 78, 88, 126, 160, 196, 198, 208, 270, 304, 306, 340, 378, 390, 414, 448, 460, 462, 510, 520, 544, 558, 700, 702, 726, 798, 810, 858, 868, 880, 918, 928, 966, 990, 1024, 1120, 1216, 1230, 1240, 1288, 1300, 1350, 1408, 1456
Offset: 1

Views

Author

Amiram Eldar, May 29 2017

Keywords

Comments

Melfi proved that this sequence is infinite.

Crossrefs

Programs

  • Mathematica
    practicalQ[n_] := Module[{f, p, e, prod=1, ok=True}, If[n<1 || (n>1 && OddQ[n]), False, If[n==1, True, f=FactorInteger[n]; {p, e} = Transpose[f]; Do[If[p[[i]] > 1+DivisorSigma[1, prod], ok=False; Break[]]; prod=prod*p[[i]]^e[[i]], {i, Length[p]}]; ok]]];
    a={}; p1=False; k=2; While[Length[a]<100, p2=practicalQ[k]; If[p1 && p2, a=AppendTo[a,k-2]]; p1 = p2; k+=2];a

A211190 Number of ways to write 2n = p+2q+3r with p,q,r terms of A210479.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 3, 4, 4, 3, 4, 3, 3, 3, 4, 4, 5, 5, 5, 5, 4, 7, 6, 6, 7, 5, 6, 7, 7, 7, 7, 5, 5, 8, 6, 7, 8, 5, 8, 10, 9, 9, 11, 9, 8, 12, 9, 8, 10, 7, 7, 10, 8, 7, 9, 7, 6, 12, 8, 9, 11, 7, 8, 10, 8, 7, 11, 8, 7, 11, 7, 7, 10, 6, 5, 8, 7, 6, 10, 7, 7, 10, 7, 6, 11, 7, 7, 10, 5, 5, 10, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 03 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>8. Moreover, for positive integers a<=b<=c, all integers n>=3(a+b+c) with n-a-b-c even can be written as a*p+b*q+c*r with p,q,r terms of A210479, if and only if (a,b,c) is among the following 6 triples: (1,2,3), (1,2,4), (1,2,8), (1,2,9), (1,3,5), (1,3,8).
The author also conjectured that if n>8 is odd, different from 201 and 447, and not congruent to 1 or -1 modulo 12, then n can be written as a sum of three terms of A210479.

Examples

			a(10)=1 since 2*10=5+2*3+3*3 with 3 and 5 terms of A210479.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
    p[k_]:=p[k]=pr[Prime[k]-1]==True&&pr[Prime[k]+1]==True
    q[n_]:=q[n]=PrimeQ[n]==True&&pr[n-1]==True&&pr[n+1]==True
    a[n_]:=a[n]=Sum[If[p[j]==True&&p[k]==True&&q[2n-2Prime[j]-3Prime[k]]==True,1,0],{j,1,PrimePi[n]},{k,1,PrimePi[(2n-2Prime[j])/3]}]
    Do[Print[n," ",a[n]],{n,1,100}]
Showing 1-3 of 3 results.