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 81-90 of 587 results. Next

A337047 Numbers k such that A001414(k) and A001414(A004086(k)) are twin primes p, p+2.

Original entry on oeis.org

405, 412, 850, 25315, 49419, 50127, 224315, 293394, 308700, 697136, 801350, 811910, 997425, 1118520, 1152000, 1177250, 1550520, 1659350, 1725332, 1739640, 1824500, 1976895, 2141150, 2580640, 2580831, 3530466, 3718376, 4050405, 4459455, 4536532, 4577732, 4832796, 5173100, 5510287, 5601570, 5603989, 5609439
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 12 2020

Keywords

Examples

			a(3)=850 is in the sequence because A001414(850)=2+5+5+17=29, A001414(58)=2+29=31, and (29,31) is a pair of twin primes.
		

Crossrefs

Cf. A001097, A001414, A004086. Subsequence of A100118.

Programs

  • Maple
    revdigs:= proc(n) local L,k;
      L:= convert(n,base,10);
      add(L[-k]*10^(k-1),k=1..nops(L))
    end proc:
    filter:= proc(n) local a,b;
      a:= convert(map(convert,ifactors(n)[2],`*`),`+`);
      if not isprime(a) then return false fi;
      b:= convert(map(convert,ifactors(revdigs(n))[2],`*`),`+`);
      b = a+2 and isprime(b)
    end proc:
    select(filter, [$1 .. 10^7]);

A338030 Primes p such that reverse(p), reverse(2*p) and reverse(2*reverse(p)) are all primes, where reverse = A004086.

Original entry on oeis.org

7, 17, 37, 71, 73, 167, 181, 191, 353, 373, 389, 761, 787, 797, 929, 983, 1753, 1879, 3571, 7057, 7177, 7507, 7717, 7879, 9349, 9439, 9781, 9787, 15053, 15227, 15307, 15451, 15551, 15667, 15679, 15791, 15919, 16061, 16073, 16453, 16547, 16561, 16747, 16883, 16979, 17471, 17909, 17971, 18427
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Oct 09 2020

Keywords

Examples

			a(3) = 37 is a term because 37, reverse(37)=73, reverse(2*37)=47 and reverse(2*73)=641 are prime.
		

Crossrefs

Programs

  • Maple
    rev:= proc(n) local L,k;
      L:= convert(n,base,10);
      add(L[-k]*10^(k-1),k=1..nops(L))
    end proc:
    filter:= proc(n) local r;
    if not isprime(n) then return false fi;
      r:= rev(n);
    isprime(r) and isprime(rev(2*n)) and isprime(rev(2*r))
    end proc:
    select(filter, [seq(i,i=3..20000,2)]);
  • Mathematica
    With[{rev = IntegerReverse}, Select[Range[20000], AllTrue[{#, rev[#], rev[2*#], rev[2*rev[#]]}, PrimeQ] &]] (* Amiram Eldar, Oct 10 2020 *)
  • PARI
    rev(n) = fromdigits(Vecrev(digits(n))); \\ A004086
    isok(p) = if (isprime(p), my(r=rev(p)); isprime(r) && isprime(rev(2*p)) && isprime(rev(2*r))); \\ Michel Marcus, Oct 10 2020

A349709 Primes p such that if q is the next prime, A004086(p*q) = A004086(p)*A004086(q).

Original entry on oeis.org

2, 7, 11, 97, 101, 1021, 1201, 2003, 3001, 10103, 10111, 20011, 20021, 21001, 101111, 102001, 102101, 112103, 112111, 120103, 201011, 202001, 1000003, 1000211, 1010003, 1010201, 1011001, 1020011, 1100101, 1100311, 1111013, 1111021, 1112003, 1201001, 2011201, 2020001, 2100001, 2100011, 10000103
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 05 2022

Keywords

Examples

			a(6) = 1021 is a term because it is prime, the next prime is 1031, and the reverse of 1021*1031 = 1052651 is 1562501 = 1301*1201.
		

Crossrefs

Cf. A004086.

Programs

  • Maple
    revdigs:= proc(n) local L,i,m;
      L:= convert(n,base,10);
      m:= nops(L);
      add(L[i]*10^(m-i),i=1..m)
    end proc:
    R:= NULL: count:= 0:
    q:= 2: qr:= 2:
    while count < 50 do
      p:= q; pr:= qr;
      q:= nextprime(q); qr:= revdigs(q);
      if pr*qr = revdigs(p*q) then
         count:= count+1; R:= R, p;
      fi
    od:
    R;
  • Mathematica
    seqQ[p_] := PrimeQ[p] && Module[{r = IntegerReverse, q = NextPrime[p]}, r[p*q] == r[p] * r[q]]; Select[Range[2.2*10^6], seqQ] (* Amiram Eldar, Jan 05 2022 *)
  • PARI
    R(n) = fromdigits(Vecrev(digits(n))); \\ A004086
    isok(p) = if (isprime(p), my(q=nextprime(p+1)); R(p*q) == R(p)*R(q)); \\ Michel Marcus, Jan 05 2022
    
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def R(n): return int(str(n)[::-1])
    def agen(): # generator of terms
        p, pr = 2, 2
        while True:
            q = nextprime(p)
            qr = R(q)
            if R(p*q) == pr * qr:
                yield p
            p, pr = q, qr
    print(list(islice(agen(), 38))) # Michael S. Branicky, Jan 05 2022

A350401 Primes p such that if q is the next prime, p*q mod (A004086(p)+A004086(q)) is prime.

Original entry on oeis.org

3, 5, 7, 11, 13, 23, 29, 31, 53, 59, 71, 73, 83, 89, 101, 107, 109, 127, 137, 149, 163, 173, 181, 191, 193, 211, 223, 227, 233, 239, 257, 271, 277, 281, 283, 307, 317, 367, 373, 389, 409, 419, 431, 449, 461, 463, 467, 479, 491, 509, 521, 523, 547, 577, 587, 593, 607, 613, 631, 641, 643, 653, 659
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 28 2021

Keywords

Examples

			a(6) = 23 is a member because it is prime, the next prime is 29, and 23*29 mod (32+92) = 667 mod 124 = 47 is prime.
		

Crossrefs

Cf. A004086.

Programs

  • Maple
    revdigs:= proc(n) local L,i,m;
      L:= convert(n,base,10); m:= nops(L);
      add(L[i]*10^(m-i),i=1..m)
    end proc:
    q:= 2: qr:= 2:
    R:= NULL: count:= 0:
    while count < 100 do
      p:=q; pr:= qr;
      q:= nextprime(p); qr:= revdigs(q); s:= p*q mod (pr+qr);
      if isprime(s) then
         R:= R, p; count:= count+1;
      fi
    od:
    R;

A351728 Primes p such that if q is the next prime, p+A004086(q) and q+A004086(p) are prime.

Original entry on oeis.org

2, 61, 83, 433, 677, 2351, 2399, 2441, 4397, 4457, 4673, 6257, 6367, 6961, 8263, 8713, 8761, 20627, 21391, 21649, 22721, 22871, 23227, 23761, 25111, 25321, 25589, 25609, 25741, 25841, 26597, 26731, 26981, 27179, 27271, 27299, 27367, 27409, 27481, 27961, 28559, 29881, 40609, 40927, 40933, 42197
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Mar 20 2022

Keywords

Comments

For each term p except 2, A013632(p) is divisible by 6.

Examples

			a(3) = 83 is a term because it is prime, the next prime is 89, and 83+98 = 181 and 38+89 = 127 are both prime.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L,i; L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    Primes:= select(isprime, [2,seq(i,i=3..10000,2)]):
    RPrimes:= map(revdigs,Primes):
    Primes[select(i -> isprime(Primes[i]+RPrimes[i+1]) and isprime(RPrimes[i]+Primes[i+1]), [$1..nops(Primes)-1])]:

A354285 Numbers k such that one of k, k+1, k+2 is prime and the other two are semiprimes, and one of R(n), R(n+1), R(n+2) is prime and the other two are semiprimes, where R = A004086.

Original entry on oeis.org

4, 157, 177, 1381, 1437, 7417, 9661, 9901, 12757, 15297, 15681, 16921, 35961, 36901, 39777, 75741, 77277, 93097, 94441, 103317, 108201, 111261, 117541, 121377, 127597, 128461, 128901, 130197, 134677, 146841, 147417, 151377, 156601, 160077, 165441, 166861, 169177, 178537, 185901, 187881, 306541
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, May 29 2022

Keywords

Comments

All terms after the first == 1 (mod 4).

Examples

			a(3) = 177 is a term because 177 = 3*59 and 178 = 2*89 are semiprimes, 179 is prime, 771 = 3*257 and 871 = 13*67 are semiprimes and 971 is prime.
		

Crossrefs

Cf. A004086.

Programs

  • Maple
    revdigs:= proc(n) local i,L;
      L:= convert(n,base,10);
      add(10^(i-1)*L[-i],i=1..nops(L))
    end proc:
    f:= proc(n) uses numtheory;
          if not isprime((n+1)/2) then return false fi;
          if n mod 3 = 0 then if not(isprime(n/3) and isprime(n+2)) then return false fi
          elif n mod 3 = 2 then return false
          elif not(isprime(n) and isprime((n+2)/3)) then return false
          fi;
          sort(map(bigomega@revdigs,[n,n+1,n+2]))=[1,2,2]
    end proc:
    f(4):= true:
    select(f, [4, seq(i,i=5..10^6,4)]);
  • Mathematica
    Select[Range[300000], Sort[PrimeOmega[# + {0, 1, 2}]] == Sort[PrimeOmega[IntegerReverse[# + {0, 1, 2}]]] == {1, 2, 2} &] (* Amiram Eldar, May 29 2022 *)

A355617 a(1) = 1; a(2) = 2; for n > 2, a(n) = R(a(n-1)) if a(n-1) != R(a(n-2)) and R(a(n-1)) has not yet been used, where R is the digit reversal function A004086, otherwise a(n) is the smallest positive integer > a(n-1) that has not yet been used.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 22, 23, 32, 33, 34, 43, 44, 45, 54, 55, 56, 65, 66, 67, 76, 77, 78, 87, 88, 89, 98, 99, 100, 101, 102, 201, 202, 203, 302, 303, 304, 403, 404, 405, 504, 505, 506, 605, 606, 607, 706, 707, 708, 807, 808, 809, 908, 909
Offset: 1

Views

Author

Sylvia Zevi Abrams, Jul 09 2022

Keywords

Comments

A regular pattern of rectangles, each 10 times larger than the last, appears on the scatter plot of this sequence. However, there are moments where the sequence deviates from its current rectangle to drop down to lower orders of magnitude or jump up to higher ones. Additionally, chaotic behavior can be observed at values of n in the approximate intervals [60000, 63000], [68000, 82000], and [85000, 100000].
Not all integers appear in this sequence. The smallest number that will never occur is 130, as the only way to achieve the number is through 129, which had already been used to jump to 921.

Examples

			a(11) = 11 because R(a(10)) = 1, which was already used as a(1).
a(13) = 21 because R(a(12)) = 21, which had not yet been used, and a(11) =! R(a(12)).
a(64) = 20 because although R(a(63)) = 91 and 91 has not yet been used, a(63) = R(a(62)).
		

Crossrefs

Cf. A004086.

Programs

  • PARI
    R(n) = fromdigits(Vecrev(digits(n))); \\ A004086
    leastunused(va, m) = my(k=va[m]+1); while (#select(x->(x==k), va), k++); k;
    lista(nn) = my(va = vector(nn)); va[1] = 1; va[2] = 2; for (n=3, nn, if ((va[n-1] != R(va[n-2])) && !#select(x->(x==R(va[n-1])), va), va[n] = R(va[n-1]), va[n] = leastunused(va, n-1));); va; \\ Michel Marcus, Jul 12 2022

A359173 Numbers whose square can be expressed as k * A004086(k) with non-palindromic k.

Original entry on oeis.org

10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 200, 220, 252, 300, 330, 400, 403, 440, 500, 504, 550, 600, 660, 700, 770, 800, 816, 880, 900, 990, 1000, 1010, 1100, 1110, 1210, 1310, 1410, 1510, 1610, 1710, 1810, 1910, 2000, 2020, 2120, 2200, 2220, 2320, 2420, 2520, 2620, 2720, 2772
Offset: 1

Views

Author

Hugo Pfoertner, Dec 17 2022

Keywords

Comments

If k is a term, then so is 10*k. - Robert Israel, Dec 23 2022

Examples

			a(1) = 10 because 100*1 = 10^2;
a(2) = 20: 200*2 = 20^2;
a(11) = 110: 1100*11 = 110^2;
a(14) = 252: 144*441 = 252^2;
a(28) = 816: 768*867 = 816^2.
		

Crossrefs

Programs

  • Maple
    rev:= proc(n) local L,i; L:= convert(n,base,10); add(L[-i]*10^(i-1),i=1..nops(L)) end proc:
    g:= proc(d,m) local r; r:= rev(d); r <> d and m = d*r end proc:
    filter:= proc(n) ormap(g, numtheory:-divisors(n^2),n^2) end proc:
    select(filter, [$1..3000]); # Robert Israel, Dec 23 2022
  • PARI
    L=List(); for (k=1, 3*10^6, my (r=fromdigits(Vecrev(digits(k))), s); if (issquare(r*k, &s) && r!=k, if(s<3001, listput(L, s)))); Set(L)
    
  • Python
    from itertools import count, islice
    from sympy import divisors
    def A359173_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:any(d*int(str(d)[::-1])==n**2 for d in divisors(n**2,generator=True) if d != n),count(max(startvalue,1)))
    A359173_list = list(islice(A359173_gen(),30)) # Chai Wah Wu, Dec 19 2022

A371034 For n >= 1, a(n) = A004086(n) if A055483(n) = 1, otherwise a(n) = n / A055483(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 31, 41, 5, 61, 71, 2, 91, 10, 7, 1, 32, 4, 52, 13, 3, 14, 92, 10, 13, 23, 1, 43, 53, 4, 73, 83, 13, 10, 14, 7, 34, 1, 5, 23, 74, 4, 94, 10, 17, 25, 35, 6, 1, 65, 19, 85, 95, 10, 16, 31, 7, 32, 56, 1, 76, 34, 23, 10, 17, 8, 37, 47
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 31 2024

Keywords

Comments

Also a(n) = R(n) if (n, R(n)) are coprime, otherwise a(n) = n / GCD(n, R(n)), where R(n) is the digit reversal of n. a(n) = 1 for n from the union of A011557 and A002113 and A001232 and A008918.

Examples

			n = 13: A004086(13) = 31, A055483(13) = 1 thus a(13) = 31.
n = 15: A004086(15) = 51, A055483(15) = 3 thus a(15) = 15/3 = 5.
		

Crossrefs

Programs

  • Maple
    rev:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    f:= proc(n) local r,g;
      r:= rev(n);
      g:= igcd(n,r);
      if g = 1 then r else n/g fi
    end proc;
    map(f, [$1..100]); # Robert Israel, Jul 09 2024
  • Mathematica
    a[n_] := Module[{r = IntegerReverse[n], g}, g = GCD[n, r]; If[g == 1, r, n/g]]; Array[a, 100] (* Amiram Eldar, Mar 31 2024 *)

Formula

a(A011557(k)) = 1, k >= 0.
a(A002113(k)) = 1, k >= 2.
a(A001232(k)) = 1, k >= 1.
a(A008918(k)) = 1, k >= 1.

A068158 a(n) = floor(n!/R(n)!), where R(n) = digit reversal of n (A004086).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 3628800, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1216451004088320000, 106661318400, 1, 0, 0, 0, 0, 0, 0, 0, 44208809968698509772718080000000, 1320509264105545113600000, 10178348544000, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Amarnath Murthy, Feb 24 2002

Keywords

Comments

If n < R(n) then a(n) = 0.
If n = R(n) then n is a palindrome and a(n) = 1.
If n > R(n) then n!/R(n)! is an integer.

Examples

			a(21) = 21! / 12! = 51090942171709440000/479001600 = 106661318400.
		

Crossrefs

Cf. A004086.

Programs

  • PARI
    a(n) = n!\fromdigits(Vecrev(digits(n)))!; \\ Michel Marcus, Aug 19 2024
Previous Showing 81-90 of 587 results. Next