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.

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