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

A258413 Numbers m such that antisigma(m) contains sigma(m) as a substring.

Original entry on oeis.org

34, 79, 479, 1529, 2879, 4895, 8873, 14243, 26879, 62498, 79999, 295285, 559571, 589219, 644735, 799999, 2012897, 2181600, 2233033, 2395488, 6399839, 7453541, 7922023, 8598719, 22928034, 26861727, 37894930, 55056372, 63652895, 76820471, 144726608, 174044214
Offset: 1

Views

Author

Paolo P. Lava, May 29 2015

Keywords

Comments

Prime numbers in the sequence: 79, 479, 2879, 14243, 26879, 79999, 559571, 589219, ...
The primes of the form 8*10^k-1, for k>0, like 79 or 79999, are terms. See A056721. - Giovanni Resta, Jun 08 2015

Examples

			sigma(34) = 54 and antisigma(34) = 34*35/2 - 54 = 541, which contains 54 as a substring;
sigma(79) = 80 and antisigma(79) = 79*80/2 - 80 = 3080, which contains 80 as a substring;
sigma(479) = 480 and antisigma(479) = 479*480/2 - 480 = 114480, which contains 480 as a substring.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,b,c,d,j,k,n;
    for n from 1 to q do a:=sigma(n); c:=ilog10(a)+1; b:=n*(n+1)/2-sigma(n); d:=ilog10(b)+1; for k from 0 to d-c do j:=trunc(b/10^k);
    if a=j-trunc(j/10^c)*10^c then print(n); break; fi; od; od; end: P(10^9);
  • Mathematica
    fQ[n_]:=StringMatchQ[ToString[n*(n+1)/2-DivisorSigma[1,n]],_~~ToString[DivisorSigma[1,n]]~~_];Select[Range[10^5],fQ[#]&] (* Ivan N. Ianakiev, Jun 18 2015 *)
    fQ[n_]:=StringContainsQ[ToString[n*(n+1)/2-DivisorSigma[1,n]],ToString[DivisorSigma[1,n]]];Select[Range[10^5],fQ[#]&] (* much faster *) (* Ivan N. Ianakiev, Apr 02 2022 *)

Extensions

a(16)-a(32) from Giovanni Resta, Jun 08 2015

A093947 Primes of the form 8*10^k - 1.

Original entry on oeis.org

7, 79, 79999, 799999, 799999999, 79999999999, 79999999999999999999999999, 79999999999999999999999999999999999999999999999999, 79999999999999999999999999999999999999999999999999999999999999999999999999999
Offset: 1

Views

Author

Rick L. Shepherd, Apr 17 2004

Keywords

Comments

Equivalently, primes of the form 7*10^k + 9*R_k, where R_k is the repunit (A002275) of length k.

Crossrefs

Cf. A002275, A056721 (corresponding k).
Primes in A198973.

Programs

  • Magma
    [a: n in [0..200] | IsPrime(a) where a is (8*10^n-1)]; // Vincenzo Librandi, May 08 2019
  • Mathematica
    Select[Table[FromDigits[PadRight[{7}, n, 9]], {n, 50}], PrimeQ] (* Vincenzo Librandi, May 08 2019 *)

Formula

a(n) = 8*10^A056721(n) - 1 = A198973(A056721(n)). - Elmo R. Oliveira, Jun 14 2025

A129990 Primes p such that the smallest integer whose sum of decimal digits is p is prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 41, 43, 71, 79, 97, 173, 179, 257, 269, 311, 389, 691, 4957, 8423, 11801, 14621, 25621, 26951, 38993, 75743, 102031, 191671, 668869
Offset: 1

Views

Author

J. M. Bergot, Jun 14 2007

Keywords

Examples

			The smallest integer whose sum of digits is 17 is 89; 89 is prime, therefore 17 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1000]],PrimeQ[FromDigits[Join[{Mod[ #,9]},Table[9,{i,1,Floor[ #/9]}]]]] &]
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def A051885(n): return ((n%9)+1)*10**(n//9)-1 # from Chai Wah Wu
    def agen(startp=2):
        p = startp
        while True:
            if isprime(A051885(p)): yield p
            p = nextprime(p)
    print(list(islice(agen(), 23))) # Michael S. Branicky, Jul 27 2022
    
  • Sage
    sorted( filter(is_prime, sum(([9*t+k for t in oeis(seq).first_terms()] for seq,k in (('A002957',1), ('A056703',2), ('A056712',4), ('A056716',5), ('A056721',7), ('A056725',8))), [3])) ) # Max Alekseyev, Feb 05 2025

Formula

Primes p such that (p mod 9 + 1) * 10^[p/9] - 1 is prime. Therefore the sequence consists of the term 3 and the primes of the forms A002957(k)*9+1, A056703(k)*9+2, A056712(k)*9+4, A056716(k)*9+5, A056721(k)*9+7, A056725(k)*9+8. - Max Alekseyev, Nov 09 2009

Extensions

Edited, corrected and extended by Stefan Steinerberger, Jun 23 2007
Extended by D. S. McNeil, Mar 20 2009
a(29)-a(33) from Max Alekseyev, Nov 09 2009

A248819 Numbers n such that the digits of antisigma(n) end in sigma(n).

Original entry on oeis.org

79, 479, 2879, 4895, 26879, 79999, 644735, 799999, 2395488, 6399839, 8598719, 63652895, 144726608, 799999999, 935546879, 12640160863, 15282380799, 43687707904, 79999999999
Offset: 1

Views

Author

Paolo P. Lava, Oct 15 2014

Keywords

Comments

All the primes of the form 8*10^k-1 for k>0 are terms (A056721). - Giovanni Resta, May 29 2016

Examples

			sigma(4895) = 6480 and antisigma of 4895 is (4895 * 4896) / 2 - sigma(4895) = 11982960 - 6480 = 11976480.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,n;
    for n from 1 to q do then a:=ilog10(sigma(n))+1;
    if sigma(n)=((n*(n+1)/2-sigma(n)) mod 10^a) then print(n);
    fi; od; end: P(10^9);

Extensions

a(9)-a(19) from Giovanni Resta, May 29 2016
Showing 1-4 of 4 results.